Merge pull request #2637 from SomMeri/empty-source-map-to-empty-file-2430

Undefined source map should result in an empty map file.
This commit is contained in:
Luke Page
2015-07-19 21:16:26 +01:00
2 changed files with 4 additions and 0 deletions

View File

@@ -449,6 +449,9 @@ module.exports = function (grunt) {
// Run all tests
grunt.registerTask('test', testTasks);
// Run all tests
grunt.registerTask('quicktest', testTasks.slice(0, testTasks.length -1));
// generate a good test environment for testing sourcemaps
grunt.registerTask('sourcemap-test', [
'clean:sourcemap-test',

View File

@@ -353,6 +353,7 @@ function printUsage() {
if (!sourceMapFileInline) {
var writeSourceMap = function(output, onDone) {
output = output || "";
var filename = sourceMapOptions.sourceMapFullFilename;
ensureDirectory(filename);
fs.writeFile(filename, output, 'utf8', function (err) {