Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 270b506

Browse files
committed
Add source map generation to closure compiler arguments
1 parent 695c54c commit 270b506

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/grunt/utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,17 @@ module.exports = {
123123

124124
min: function(file, done) {
125125
var minFile = file.replace(/\.js$/, '.min.js');
126+
var sourceMapFile = minFile + '.map';
126127
shell.exec(
127128
'java ' +
128129
this.java32flags() + ' ' +
129130
'-jar lib/closure-compiler/compiler.jar ' +
130131
'--compilation_level SIMPLE_OPTIMIZATIONS ' +
131132
'--language_in ECMASCRIPT5_STRICT ' +
132133
'--js ' + file + ' ' +
133-
'--js_output_file ' + minFile,
134+
'--js_output_file ' + minFile + ' ' +
135+
'--create_source_map ' + sourceMapfile + ' ' +
136+
'--source_map_format=V3',
134137
function(code) {
135138
if (code !== 0) grunt.fail.warn('Error minifying ' + file);
136139
grunt.file.write(minFile, this.singleStrict(grunt.file.read(minFile), '\n'));

0 commit comments

Comments
 (0)