Skip to content

Commit

Permalink
Fix #14415. Remove the source map comment in the release script. Close
Browse files Browse the repository at this point in the history
  • Loading branch information
mgol committed Nov 10, 2013
1 parent 650f325 commit 562145e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions build/release.js
Expand Up @@ -165,12 +165,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 );
Expand Down

0 comments on commit 562145e

Please sign in to comment.