Modified min build to include (like pack) the license header, thanks John for the regex
This commit is contained in:
parent
a6b91166af
commit
f621f92a4d
|
@ -1,5 +1,11 @@
|
|||
load("build/js/jsmin.js", "build/js/writeFile.js");
|
||||
|
||||
var f = jsmin('', readFile(arguments[0]), 3);
|
||||
// arguments
|
||||
var inFile = arguments[0];
|
||||
var outFile = arguments[1] || inFile.replace(/\.js$/, ".min.js");
|
||||
|
||||
writeFile( arguments[1], f );
|
||||
var script = readFile(inFile);
|
||||
var header = script.match(/\/\*(.|\n)*?\*\//)[0];
|
||||
var minifiedScript = jsmin('', script, 3);
|
||||
|
||||
writeFile( outFile, header + minifiedScript );
|
||||
|
|
|
@ -5,7 +5,7 @@ load("build/js/Words.js");
|
|||
|
||||
// arguments
|
||||
var inFile = arguments[0];
|
||||
var outFile = arguments[1] || inFile.replace(/\.js$/, "-p.js");
|
||||
var outFile = arguments[1] || inFile.replace(/\.js$/, "pack.js");
|
||||
|
||||
// options
|
||||
var base62 = true;
|
||||
|
|
Loading…
Reference in a new issue