diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2015-08-16 09:59:58 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-09-07 20:03:50 +0300 |
commit | 10fdad742a2a6aa9f0e00b3e04fc5264797c53c7 (patch) | |
tree | 6b6d7b1375ff88f4bebbfa0703f7b595eb485df9 /build/release/cdn.js | |
parent | 7aa46e0df8a673e6b00550bbbbed21eed50108b7 (diff) | |
download | jquery-10fdad742a2a6aa9f0e00b3e04fc5264797c53c7.tar.gz jquery-10fdad742a2a6aa9f0e00b3e04fc5264797c53c7.zip |
Build: Update jscs and lint files
Fixes gh-2056
Diffstat (limited to 'build/release/cdn.js')
-rw-r--r-- | build/release/cdn.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/build/release/cdn.js b/build/release/cdn.js index 6c497ee0b..07285a56d 100644 --- a/build/release/cdn.js +++ b/build/release/cdn.js @@ -29,13 +29,14 @@ var function makeReleaseCopies( Release ) { shell.mkdir( "-p", cdnFolder ); - Object.keys( releaseFiles ).forEach(function( key ) { + Object.keys( releaseFiles ).forEach( function( key ) { var text, builtFile = releaseFiles[ key ], unpathedFile = key.replace( /VER/g, Release.newVersion ), releaseFile = cdnFolder + "/" + unpathedFile; if ( /\.map$/.test( releaseFile ) ) { + // Map files need to reference the new uncompressed name; // assume that all files reside in the same directory. // "file":"jquery.min.js","sources":["jquery.js"] @@ -47,7 +48,7 @@ function makeReleaseCopies( Release ) { } else if ( builtFile !== releaseFile ) { shell.cp( "-f", builtFile, releaseFile ); } - }); + } ); } function makeArchives( Release, callback ) { @@ -75,23 +76,23 @@ function makeArchives( Release, callback ) { output.on( "error", function( err ) { throw err; - }); + } ); archiver.pipe( output ); - files = files.map(function( item ) { + files = files.map( function( item ) { return "dist" + ( rver.test( item ) ? "/cdn" : "" ) + "/" + item.replace( rver, Release.newVersion ); - }); + } ); sum = Release.exec( "md5sum " + files.join( " " ), "Error retrieving md5sum" ); fs.writeFileSync( md5file, sum ); files.push( md5file ); - files.forEach(function( file ) { + files.forEach( function( file ) { archiver.append( fs.createReadStream( file ), { name: path.basename( file ) } ); - }); + } ); archiver.finalize(); } @@ -104,9 +105,9 @@ function makeArchives( Release, callback ) { makeArchive( "mscdn", msFilesCDN, callback ); } - buildGoogleCDN(function() { + buildGoogleCDN( function() { buildMicrosoftCDN( callback ); - }); + } ); } module.exports = { |