@@ -169,11 +169,6 @@ module.exports = function(grunt) {
169
169
uglify : {
170
170
options : {
171
171
sourceMap : true ,
172
- sourceMapName : function ( dest ) {
173
- return path . join ( path . dirname ( dest ) ,
174
- path . basename ( dest , '.js' ) ) +
175
- '.map' ;
176
- } ,
177
172
178
173
// Only preserve comments that start with (!)
179
174
preserveComments : / ^ ! / ,
@@ -191,10 +186,6 @@ module.exports = function(grunt) {
191
186
}
192
187
} ,
193
188
194
- fixSourceMaps : {
195
- all : [ 'build/**/*.map' ]
196
- } ,
197
-
198
189
eslint : {
199
190
target : [ 'Gruntfile.js' , 'src/**/*.js' , 'plugins/**/*.js' ]
200
191
} ,
@@ -316,28 +307,6 @@ module.exports = function(grunt) {
316
307
grunt . config . set ( 'pkg' , pkg ) ;
317
308
} ) ;
318
309
319
- grunt . registerMultiTask ( 'fixSourceMaps' , function ( ) {
320
- this . files . forEach ( function ( f ) {
321
- f . src . filter ( function ( filepath ) {
322
- if ( ! grunt . file . exists ( filepath ) ) {
323
- grunt . log . warn ( 'Source file "' + filepath + '" not found.' ) ;
324
- return false ;
325
- } else {
326
- return true ;
327
- }
328
- } ) . forEach ( function ( filepath ) {
329
- var base = path . dirname ( filepath ) ;
330
- var sMap = grunt . file . readJSON ( filepath ) ;
331
- sMap . file = path . relative ( base , sMap . file ) ;
332
- sMap . sources = _ . map ( sMap . sources , path . relative . bind ( path , base ) ) ;
333
-
334
- grunt . file . write ( filepath , JSON . stringify ( sMap ) ) ;
335
- // Print a success message.
336
- grunt . log . writeln ( 'File "' + filepath + '" fixed.' ) ;
337
- } ) ;
338
- } ) ;
339
- } ) ;
340
-
341
310
// Grunt contrib tasks
342
311
grunt . loadNpmTasks ( 'grunt-contrib-uglify' ) ;
343
312
grunt . loadNpmTasks ( 'grunt-contrib-clean' ) ;
@@ -358,8 +327,8 @@ module.exports = function(grunt) {
358
327
grunt . registerTask ( 'browserify.core' , [ '_prep' , 'browserify:core' ] . concat ( browserifyPluginTaskNames ) ) ;
359
328
grunt . registerTask ( 'browserify.plugins-combined' , [ '_prep' , 'browserify:plugins-combined' ] ) ;
360
329
grunt . registerTask ( 'build.test' , [ '_prep' , 'browserify:test' ] ) ;
361
- grunt . registerTask ( 'build.core' , [ 'browserify.core' , 'uglify' , 'fixSourceMaps' , ' sri:dist'] ) ;
362
- grunt . registerTask ( 'build.plugins-combined' , [ 'browserify.plugins-combined' , 'uglify' , 'fixSourceMaps' , ' sri:dist', 'sri:build' ] ) ;
330
+ grunt . registerTask ( 'build.core' , [ 'browserify.core' , 'uglify' , 'sri:dist' ] ) ;
331
+ grunt . registerTask ( 'build.plugins-combined' , [ 'browserify.plugins-combined' , 'uglify' , 'sri:dist' , 'sri:build' ] ) ;
363
332
grunt . registerTask ( 'build' , [ 'build.plugins-combined' ] ) ;
364
333
grunt . registerTask ( 'dist' , [ 'build.core' , 'copy:dist' ] ) ;
365
334
0 commit comments