mirror of
https://github.com/konvajs/konva.git
synced 2025-09-18 18:27:58 +08:00
updated build file to better support custom builds via configurator
This commit is contained in:
19
Thorfile
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)
|
||||
|
||||
|
27
dist/kinetic-Global-current.min.js
vendored
27
dist/kinetic-Global-current.min.js
vendored
@@ -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]}};
|
||||
|
7
dist/kinetic-current.js
vendored
7
dist/kinetic-current.js
vendored
@@ -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 = {};
|
||||
|
8
dist/kinetic-current.min.js
vendored
8
dist/kinetic-current.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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 = {};
|
||||
|
Reference in New Issue
Block a user