diff --git a/lib/precompiler.js b/lib/precompiler.js index a20d1419d..6ba3800cb 100644 --- a/lib/precompiler.js +++ b/lib/precompiler.js @@ -250,9 +250,6 @@ module.exports.cli = function(opts) { outSourceMap: opts.map, inSourceMap: JSON.parse(output.map) }); - if (opts.map) { - output.code += '\n//# sourceMappingURL=' + opts.map + '\n'; - } } if (opts.map) { diff --git a/spec/precompiler.js b/spec/precompiler.js index f9759a9ce..006a37e39 100644 --- a/spec/precompiler.js +++ b/spec/precompiler.js @@ -152,14 +152,14 @@ describe('precompiler', function() { Precompiler.cli({templates: [emptyTemplate], map: 'foo.js.map'}); equal(file, 'foo.js.map'); - equal(/sourceMappingURL=/.test(log), true); + equal(log.match(/sourceMappingURL=/g).length, 1); }); it('should output map', function() { Precompiler.cli({templates: [emptyTemplate], min: true, map: 'foo.js.map'}); equal(file, 'foo.js.map'); - equal(/sourceMappingURL=/.test(log), true); + equal(log.match(/sourceMappingURL=/g).length, 1); }); describe('#loadTemplates', function() {