Commit 68f1f4d5 authored by Rick Waldron's avatar Rick Waldron

Removes date from minimal license

parent 7a1e8809
......@@ -5,25 +5,14 @@ var print = require( "sys" ).print,
src = fs.readFileSync( process.argv[2], "utf8" ),
version = fs.readFileSync( "version.txt", "utf8" ),
// License Template
license = "/*! jQuery v@VERSION @DATE http://jquery.com/ | http://jquery.org/license */",
date;
license = "/*! jQuery v@VERSION http://jquery.com/ | http://jquery.org/license */";
// Previously done in sed but reimplemented here due to portability issues
src = src.replace( /^(\s*\*\/)(.+)/m, "$1\n$2" ) + ";";
// Mine & Munge Date information
src.split( "\n" ).forEach(function( line, idx ) {
var data = line.split( " * Date: " );
if ( data.length && data[ 1 ] ) {
date = data[ 1 ];
}
});
// Set minimal license block vars
license = license.replace( "@VERSION", version )
.replace( "@DATE", date );
// Set minimal license block var
license = license.replace( "@VERSION", version );
// Replace license block with minimal license
src = src.replace( /\/\/.*?\/?\*.+?(?=\n|\r|$)|\/\*[\s\S]*?\/\/[\s\S]*?\*\//, license );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment