Skip to content

Commit

Permalink
Breaking: Remove includeContent option
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Jun 17, 2017
1 parent f6c2765 commit 571fbcf
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ function write(file, options, callback) {
}

// Set defaults for options if unset
var opts = defaults({}, options, {
includeContent: true,
});
var opts = defaults({}, options);

var sourceMap = file.sourceMap;

Expand Down
4 changes: 0 additions & 4 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,6 @@ function commentFormatter(extname, url) {
}

function includeContent(file, state, options, callback) {
if (!options.includeContent) {
delete state.sourceMap.sourcesContent;
return callback();
}

state.sourceMap.sourcesContent = state.sourceMap.sourcesContent || [];

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 not include source content with option includeContent=false', function(done) {
var file = makeFile();
sourcemaps.write(file, { includeContent: false }, function(err, updatedFile) {
expect(updatedFile.sourceMap.sourcesContent).toBe(undefined);
done(err);
});
});

it('should fetch missing sourceContent', function(done) {
var file = makeFile();
delete file.sourceMap.sourcesContent;
Expand Down

0 comments on commit 571fbcf

Please sign in to comment.