]> source.dussan.org Git - jquery.git/commitdiff
Fix for bug #983 (Packed jQuery doesn't have a license at the top of the file.)
authorJohn Resig <jeresig@gmail.com>
Sun, 20 May 2007 16:42:42 +0000 (16:42 +0000)
committerJohn Resig <jeresig@gmail.com>
Sun, 20 May 2007 16:42:42 +0000 (16:42 +0000)
build/build/pack.js
src/intro.js

index 5706a218747441fa7240252554f2bbc043cf36b5..6a04e72240748f8cb38ea18b40fbbe9a52be862b 100644 (file)
@@ -12,7 +12,8 @@ var base62 = true;
 var shrink = true;
 
 var script = readFile(inFile);
+var header = script.match(/\/\*(.|\n)*?\*\//)[0];
 var packer = new Packer;
 var packedScript = packer.pack(script, base62, shrink);
 
-writeFile(outFile, packedScript);
+writeFile(outFile, header + "\n" + packedScript);
index fc373ab53f75f8c3fa5361b28c66c248fe646503..9204081a29af5af0d2b4c365b75b75a3e89a3f24 100644 (file)
@@ -1,2 +1,2 @@
-/* prevent execution of jQuery if included more than once */
+// prevent execution of jQuery if included more than once
 if(typeof window.jQuery == "undefined") {