Modified min build to include (like pack) the license header, thanks John for the...
[jquery.git] / build / build / min.js
index cb7788a..5707d4a 100644 (file)
@@ -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 );