Skip to content

Commit

Permalink
Close GH-4: Ensure source map object is written as JSON.
Browse files Browse the repository at this point in the history
  • Loading branch information
es128 authored and sindresorhus committed Oct 9, 2014
1 parent 9bfc33e commit 57152d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tasks/6to5.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function (grunt) {
grunt.file.write(el.dest, res.code);

if (res.map) {
grunt.file.write(el.dest + '.map', res.map);
grunt.file.write(el.dest + '.map', JSON.stringify(res.map));
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports['6to5'] = {
test.ok(/function/.test(code));

var map = fs.readFileSync('test/tmp/fixture.js.map', 'utf8');
test.deepEqual(JSON.parse(map).names, ['Test']);
test.deepEqual(JSON.parse(map).sources, ['fixture.js']);

test.done();
}
Expand Down

0 comments on commit 57152d1

Please sign in to comment.