Skip to content

Commit

Permalink
Breaking: Remove addComment option
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Jun 17, 2017
1 parent a98f7e5 commit f6c2765
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ function write(file, options, callback) {
// Set defaults for options if unset
var opts = defaults({}, options, {
includeContent: true,
addComment: true,
});

var sourceMap = file.sourceMap;
Expand Down
4 changes: 1 addition & 3 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,7 @@ function contentIncluded(file, state, options, callback) {
}

// append source map comment
if (options.addComment) {
file.contents = appendBuffer(file.contents, comment);
}
file.contents = appendBuffer(file.contents, comment);

callback();
}
Expand Down
8 changes: 0 additions & 8 deletions test/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,6 @@ describe('write', function() {
});
});

it('should write no comment with option addComment=false', function(done) {
var file = makeFile();
sourcemaps.write(file, { addComment: false }, function(err, updatedFile) {
expect(String(updatedFile.contents)).toBe(sourceContent);
done(err);
});
});

it('should not include source content with option includeContent=false', function(done) {
var file = makeFile();
sourcemaps.write(file, { includeContent: false }, function(err, updatedFile) {
Expand Down

0 comments on commit f6c2765

Please sign in to comment.