Skip to content

Commit

Permalink
Breaking: Remove sourceMappingURLPrefix option
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Jun 17, 2017
1 parent 156d084 commit a98f7e5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
6 changes: 0 additions & 6 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,6 @@ function contentIncluded(file, state, options, callback) {

var sourceMapPathRelative = path.relative(path.dirname(file.path), sourceMapPath);

// A function option here would have already been resolved higher up
if (options.sourceMappingURLPrefix) {
var prefix = options.sourceMappingURLPrefix;
sourceMapPathRelative = prefix + path.join('/', sourceMapPathRelative);
}

if (!isRemoteSource(sourceMapPathRelative)) {
comment = commentFormatter(file.extname, normalizePath(sourceMapPathRelative));
} else {
Expand Down
28 changes: 0 additions & 28 deletions test/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,34 +351,6 @@ describe('write', function() {
});
});

it('should accept a sourceMappingURLPrefix', function(done) {
var file = makeFile();
sourcemaps.write(file, {
path: '../maps',
sourceMappingURLPrefix: 'https://asset-host.example.com'
}, function(err, updatedFile) {
if (/helloworld\.js$/.test(updatedFile.path)) {
expect(/sourceMappingURL.*\n$/.exec(String(updatedFile.contents))[0]).toEqual('sourceMappingURL=https://asset-host.example.com/maps/helloworld.js.map\n');
done(err);
}
});
});

it.skip('should accept a sourceMappingURLPrefix, as a function', function(done) {
var file = makeFile();
sourcemaps.write(file, {
path: '../maps',
sourceMappingURLPrefix: function() {
return 'https://asset-host.example.com';
}
}, function(err, updatedFile) {
if (/helloworld\.js$/.test(updatedFile.path)) {
expect(/sourceMappingURL.*\n$/.exec(String(updatedFile.contents))[0]).toEqual('sourceMappingURL=https://asset-host.example.com/maps/helloworld.js.map\n');
done(err);
}
});
});

it.skip('should output an error message if debug option is set and sourceContent is missing', function(done) {
var file = makeFile();
file.sourceMap.sources[0] += '.invalid';
Expand Down

0 comments on commit a98f7e5

Please sign in to comment.