mirror of
https://github.com/jquery/jquery.git
synced 2024-12-09 08:04:24 +00:00
Release: Remove copying of jquery-latest files
This commit is contained in:
parent
83b038fc81
commit
c34ed46eee
@ -14,14 +14,7 @@ module.exports = function( Release ) {
|
|||||||
releaseFiles = {
|
releaseFiles = {
|
||||||
"jquery-VER.js": devFile,
|
"jquery-VER.js": devFile,
|
||||||
"jquery-VER.min.js": minFile,
|
"jquery-VER.min.js": minFile,
|
||||||
"jquery-VER.min.map": mapFile //,
|
"jquery-VER.min.map": mapFile
|
||||||
// Disable these until 2.0 defeats 1.9 as the ONE TRUE JQUERY
|
|
||||||
// "jquery.js": devFile,
|
|
||||||
// "jquery.min.js": minFile,
|
|
||||||
// "jquery.min.map": mapFile,
|
|
||||||
// "jquery-latest.js": devFile,
|
|
||||||
// "jquery-latest.min.js": minFile,
|
|
||||||
// "jquery-latest.min.map": mapFile
|
|
||||||
},
|
},
|
||||||
|
|
||||||
googleFilesCDN = [
|
googleFilesCDN = [
|
||||||
@ -46,27 +39,23 @@ module.exports = function( Release ) {
|
|||||||
unpathedFile = key.replace( /VER/g, Release.newVersion ),
|
unpathedFile = key.replace( /VER/g, Release.newVersion ),
|
||||||
releaseFile = cdnFolder + "/" + unpathedFile;
|
releaseFile = cdnFolder + "/" + unpathedFile;
|
||||||
|
|
||||||
// Beta releases don't update the jquery-latest etc. copies
|
if ( /\.map$/.test( releaseFile ) ) {
|
||||||
if ( !Release.preRelease || key.indexOf( "VER" ) >= 0 ) {
|
// Map files need to reference the new uncompressed name;
|
||||||
|
// assume that all files reside in the same directory.
|
||||||
if ( /\.map$/.test( releaseFile ) ) {
|
// "file":"jquery.min.js","sources":["jquery.js"]
|
||||||
// Map files need to reference the new uncompressed name;
|
text = fs.readFileSync( builtFile, "utf8" )
|
||||||
// assume that all files reside in the same directory.
|
.replace( /"file":"([^"]+)","sources":\["([^"]+)"\]/,
|
||||||
// "file":"jquery.min.js","sources":["jquery.js"]
|
"\"file\":\"" + unpathedFile.replace( /\.min\.map/, ".min.js" ) +
|
||||||
text = fs.readFileSync( builtFile, "utf8" )
|
"\",\"sources\":[\"" + unpathedFile.replace( /\.min\.map/, ".js" ) + "\"]" );
|
||||||
.replace( /"file":"([^"]+)","sources":\["([^"]+)"\]/,
|
fs.writeFileSync( releaseFile, text );
|
||||||
"\"file\":\"" + unpathedFile.replace( /\.min\.map/, ".min.js" ) +
|
} else if ( /\.min\.js$/.test( releaseFile ) ) {
|
||||||
"\",\"sources\":[\"" + unpathedFile.replace( /\.min\.map/, ".js" ) + "\"]" );
|
// Remove the source map comment; it causes way too many problems.
|
||||||
fs.writeFileSync( releaseFile, text );
|
// Keep the map file in case DevTools allow manual association.
|
||||||
} else if ( /\.min\.js$/.test( releaseFile ) ) {
|
text = fs.readFileSync( builtFile, "utf8" )
|
||||||
// Remove the source map comment; it causes way too many problems.
|
.replace( /\/\/# sourceMappingURL=\S+/, "" );
|
||||||
// Keep the map file in case DevTools allow manual association.
|
fs.writeFileSync( releaseFile, text );
|
||||||
text = fs.readFileSync( builtFile, "utf8" )
|
} else if ( builtFile !== releaseFile ) {
|
||||||
.replace( /\/\/# sourceMappingURL=\S+/, "" );
|
shell.cp( "-f", builtFile, releaseFile );
|
||||||
fs.writeFileSync( releaseFile, text );
|
|
||||||
} else if ( builtFile !== releaseFile ) {
|
|
||||||
shell.cp( "-f", builtFile, releaseFile );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user