Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated build file to better support custom builds via configurator

  • Loading branch information...
commit 8298bdee7ad93573ad5788b4b9ff5a4d7bf7424d 1 parent 0b9af30
@ericdrowell authored
View
19 Thorfile
@@ -22,7 +22,7 @@ class Build < Thor
puts ":: Building full source file /#{file_name}..."
File.open(file_name, "w") do |file|
- file.puts concatenate(version)
+ file.puts replace_tokens(concatenate, version)
end
puts " -> Done!"
@@ -45,9 +45,9 @@ class Build < Thor
#build full minfiied prod file
#=begin
File.open(file_name, "w") do |file|
- uglify = Uglifier.compile(concatenate(version))
+ uglify = Uglifier.compile(concatenate())
uglify.sub!(/\*\/ .+ \*\//xm, "*/")
- file.puts uglify
+ file.puts replace_tokens(uglify, version)
end
#=end
@@ -59,8 +59,8 @@ class Build < Thor
mod[".js"] = ""
module_filename = "dist/kinetic-#{mod}-#{version}.min.js"
File.open(module_filename, "w") do |file2|
- uglify = Uglifier.compile(content, { copyright: false })
- file2.puts uglify
+ uglify = Uglifier.compile(content, { copyright: mod == "Global" })
+ file2.puts replace_tokens(uglify, version)
end
end
@@ -69,13 +69,18 @@ class Build < Thor
private
- def concatenate(version)
- date ||= Time.now.strftime("%b %d %Y")
+ def concatenate()
content = ""
FILES.each do |file|
content << IO.read(File.expand_path(file)) << "\n"
end
+ return content
+ end
+
+ def replace_tokens(content, version)
+ date = Time.now.strftime("%b %d %Y")
+
# Add the version number
content.sub!("@version", version)
View
27 dist/kinetic-Global-current.min.js
@@ -1 +1,28 @@
+/**
+ * KineticJS JavaScript Library current
+ * http://www.kineticjs.com/
+ * Copyright 2012, Eric Rowell
+ * Licensed under the MIT or GPL Version 2 licenses.
+ * Date: Oct 18 2012
+ *
+ * Copyright (C) 2011 - 2012 by Eric Rowell
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
var Kinetic={};Kinetic.Filters={},Kinetic.Plugins={},Kinetic.Global={BUBBLE_WHITELIST:["mousedown","mousemove","mouseup","mouseover","mouseout","mouseenter","mouseleave","click","dblclick","touchstart","touchmove","touchend","tap","dbltap","dragstart","dragmove","dragend"],BUFFER_WHITELIST:["fill","stroke","textFill","textStroke"],BUFFER_BLACKLIST:["shadow"],stages:[],idCounter:0,tempNodes:{},shapes:{},warn:function(a){console&&console.warn&&console.warn("Kinetic warning: "+a)},extend:function(a,b){for(var c in b.prototype)c in a.prototype||(a.prototype[c]=b.prototype[c])},_pullNodes:function(a){var b=this.tempNodes;for(var c in b){var d=b[c];d.getStage()!==undefined&&d.getStage()._id===a._id&&(a._addId(d),a._addName(d),this._removeTempNode(d))}},_addTempNode:function(a){this.tempNodes[a._id]=a},_removeTempNode:function(a){delete this.tempNodes[a._id]}};
View
7 dist/kinetic-current.js
@@ -3,7 +3,7 @@
* http://www.kineticjs.com/
* Copyright 2012, Eric Rowell
* Licensed under the MIT or GPL Version 2 licenses.
- * Date: Oct 14 2012
+ * Date: Oct 18 2012
*
* Copyright (C) 2011 - 2012 by Eric Rowell
*
@@ -25,11 +25,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-/**
- * Kinetic Namespace
- * @namespace
- */
var Kinetic = {};
Kinetic.Filters = {};
Kinetic.Plugins = {};
View
8 dist/kinetic-current.min.js
4 additions, 4 deletions not shown
View
5 src/Global.js
@@ -25,11 +25,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-
-/**
- * Kinetic Namespace
- * @namespace
- */
var Kinetic = {};
Kinetic.Filters = {};
Kinetic.Plugins = {};
Please sign in to comment.
Something went wrong with that request. Please try again.