Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit 295396e

Browse files
committed
move copy_sourcemap to tools
1 parent c4f6c1a commit 295396e

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

gruntfile.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,6 @@ module.exports = function(grunt) {
7878
grunt.loadNpmTasks('grunt-karma');
7979
grunt.loadNpmTasks('grunt-concat-sourcemap');
8080

81-
// tasks
82-
grunt.registerTask('sourcemap_copy', 'Copy sourcesContent between sourcemaps', function(source, dest) {
83-
var sourceMap = grunt.file.readJSON(source);
84-
var destMap = grunt.file.readJSON(dest);
85-
destMap.sourcesContent = [];
86-
var ssources = sourceMap.sources;
87-
// uglify may reorder sources, make sure sourcesContent matches new order
88-
destMap.sources.forEach(function(source) {
89-
var j = ssources.indexOf(source);
90-
destMap.sourcesContent.push(sourceMap.sourcesContent[j]);
91-
});
92-
grunt.file.write(dest, JSON.stringify(destMap));
93-
});
94-
9581
// Workaround for banner + sourceMap + uglify: https://github.com/gruntjs/grunt-contrib-uglify/issues/22
9682
grunt.registerTask('gen_license', function() {
9783
var banner = [

0 commit comments

Comments
 (0)