Skip to content
Permalink
Browse files

Removes date from minimal license

  • Loading branch information...
rwaldron committed Jul 25, 2011
1 parent 7a1e880 commit 68f1f4d54516a400ec9aa70eab50e7891032ffba
Showing with 3 additions and 14 deletions.
  1. +3 −14 build/post-compile.js
@@ -5,25 +5,14 @@ var print = require( "sys" ).print,
src = fs.readFileSync( process.argv[2], "utf8" ), src = fs.readFileSync( process.argv[2], "utf8" ),
version = fs.readFileSync( "version.txt", "utf8" ), version = fs.readFileSync( "version.txt", "utf8" ),
// License Template // License Template
license = "/*! jQuery v@VERSION @DATE http://jquery.com/ | http://jquery.org/license */", license = "/*! jQuery v@VERSION http://jquery.com/ | http://jquery.org/license */";
date;




// Previously done in sed but reimplemented here due to portability issues // Previously done in sed but reimplemented here due to portability issues
src = src.replace( /^(\s*\*\/)(.+)/m, "$1\n$2" ) + ";"; src = src.replace( /^(\s*\*\/)(.+)/m, "$1\n$2" ) + ";";


// Mine & Munge Date information // Set minimal license block var
src.split( "\n" ).forEach(function( line, idx ) { license = license.replace( "@VERSION", version );
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 );


// Replace license block with minimal license // Replace license block with minimal license
src = src.replace( /\/\/.*?\/?\*.+?(?=\n|\r|$)|\/\*[\s\S]*?\/\/[\s\S]*?\*\//, license ); src = src.replace( /\/\/.*?\/?\*.+?(?=\n|\r|$)|\/\*[\s\S]*?\/\/[\s\S]*?\*\//, license );

0 comments on commit 68f1f4d

Please sign in to comment.
You can’t perform that action at this time.