mirror of
https://github.com/jquery/jquery.git
synced 2026-01-24 17:28:39 -05:00
Fix #13983. Switch to //# for sourcemaps.
Normally we'd avoid doing this on a patch release, but Chrome Canary is
spewing deprecation warnings already and that's generating bug tickets.
(cherry picked from commit d53ddc90c1)
This commit is contained in:
@@ -115,7 +115,7 @@ module.exports = function( grunt ) {
|
||||
"/*! jQuery v<%= pkg.version %> | " +
|
||||
"(c) 2005, 2013 jQuery Foundation, Inc. | " +
|
||||
"jquery.org/license\n" +
|
||||
"//@ sourceMappingURL=jquery.min.map\n" +
|
||||
"//# sourceMappingURL=jquery.min.map\n" +
|
||||
"*/\n"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,10 +166,10 @@ function makeReleaseCopies( next ) {
|
||||
} else if ( /\.min\.js$/.test( releaseFile ) ) {
|
||||
// Minified files point back to the corresponding map;
|
||||
// again assume one big happy directory.
|
||||
// "//@ sourceMappingURL=jquery.min.map"
|
||||
// "//# sourceMappingURL=jquery.min.map"
|
||||
text = fs.readFileSync( builtFile, "utf8" )
|
||||
.replace( /\/\/@ sourceMappingURL=\S+/,
|
||||
"//@ sourceMappingURL=" + unpathedFile.replace( /\.js$/, ".map" ) );
|
||||
.replace( /\/\/# sourceMappingURL=\S+/,
|
||||
"//# sourceMappingURL=" + unpathedFile.replace( /\.js$/, ".map" ) );
|
||||
fs.writeFileSync( releaseFile, text );
|
||||
} else if ( builtFile !== releaseFile ) {
|
||||
copy( builtFile, releaseFile );
|
||||
|
||||
Reference in New Issue
Block a user