git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed all inline documentation. The current version of all documentation is stored...
[jquery.git]
/
build
/
build
/
min.js
diff --git
a/build/build/min.js
b/build/build/min.js
index
052b9a0
..
5707d4a
100644
(file)
--- a/
build/build/min.js
+++ b/
build/build/min.js
@@
-1,5
+1,11
@@
-load("../jquery/build/js/jsmin.js", "../jquery/build/js/writeFile.js");
+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 );