mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
20ddbe4f59
Ref 10fdad742a
Fixes gh-2056
15 lines
512 B
JavaScript
15 lines
512 B
JavaScript
var fs = require( "fs" );
|
|
|
|
module.exports = function( grunt ) {
|
|
var minLoc = Object.keys( grunt.config( "uglify.all.files" ) )[ 0 ];
|
|
grunt.registerTask( "remove_map_comment", function() {
|
|
|
|
// Remove the source map comment; it causes way too many problems.
|
|
// The map file is still generated for manual associations
|
|
// https://github.com/jquery/jquery/issues/1707
|
|
var text = fs.readFileSync( minLoc, "utf8" )
|
|
.replace( /\/\/# sourceMappingURL=\S+/, "" );
|
|
fs.writeFileSync( minLoc, text );
|
|
} );
|
|
};
|