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

Commit

Permalink
move copy_sourcemap to tools
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Oct 22, 2013
1 parent c4f6c1a commit 295396e
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-concat-sourcemap');

// tasks
grunt.registerTask('sourcemap_copy', 'Copy sourcesContent between sourcemaps', function(source, dest) {
var sourceMap = grunt.file.readJSON(source);
var destMap = grunt.file.readJSON(dest);
destMap.sourcesContent = [];
var ssources = sourceMap.sources;
// uglify may reorder sources, make sure sourcesContent matches new order
destMap.sources.forEach(function(source) {
var j = ssources.indexOf(source);
destMap.sourcesContent.push(sourceMap.sourcesContent[j]);
});
grunt.file.write(dest, JSON.stringify(destMap));
});

// Workaround for banner + sourceMap + uglify: https://github.com/gruntjs/grunt-contrib-uglify/issues/22
grunt.registerTask('gen_license', function() {
var banner = [
Expand Down

0 comments on commit 295396e

Please sign in to comment.