mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Fix #14415. Remove the source map comment in the release script. Close gh-1424. (cherry-picked from 562145e887
)
This commit is contained in:
parent
762459aa0d
commit
3fa4f48d5c
@ -164,12 +164,10 @@ function makeReleaseCopies( next ) {
|
|||||||
"\",\"sources\":[\"" + unpathedFile.replace( /\.min\.map/, ".js" ) + "\"]" );
|
"\",\"sources\":[\"" + unpathedFile.replace( /\.min\.map/, ".js" ) + "\"]" );
|
||||||
fs.writeFileSync( releaseFile, text );
|
fs.writeFileSync( releaseFile, text );
|
||||||
} else if ( /\.min\.js$/.test( releaseFile ) ) {
|
} else if ( /\.min\.js$/.test( releaseFile ) ) {
|
||||||
// Minified files point back to the corresponding map;
|
// Remove the source map comment; it causes way too many problems.
|
||||||
// again assume one big happy directory.
|
// Keep the map file in case DevTools allow manual association.
|
||||||
// "//# sourceMappingURL=jquery.min.map"
|
|
||||||
text = fs.readFileSync( builtFile, "utf8" )
|
text = fs.readFileSync( builtFile, "utf8" )
|
||||||
.replace( /\/\/# sourceMappingURL=\S+/,
|
.replace( /\/\/# sourceMappingURL=\S+/, "" );
|
||||||
"//# sourceMappingURL=" + unpathedFile.replace( /\.js$/, ".map" ) );
|
|
||||||
fs.writeFileSync( releaseFile, text );
|
fs.writeFileSync( releaseFile, text );
|
||||||
} else if ( builtFile !== releaseFile ) {
|
} else if ( builtFile !== releaseFile ) {
|
||||||
copy( builtFile, releaseFile );
|
copy( builtFile, releaseFile );
|
||||||
|
Loading…
Reference in New Issue
Block a user