Using mold-source-maps to remove working path from source map
It still shows up in the sourceURL embedded by a traceur compiler. Still need to work on that, but this is a little better.
This commit is contained in:
parent
998e2a5574
commit
c809913fe7
@ -70,7 +70,8 @@ gulp.task('browserify', function() {
|
|||||||
var browserify = require('browserify'),
|
var browserify = require('browserify'),
|
||||||
exorcist = require('exorcist'),
|
exorcist = require('exorcist'),
|
||||||
tap = require('gulp-tap'),
|
tap = require('gulp-tap'),
|
||||||
transform = require('vinyl-transform');
|
transform = require('vinyl-transform'),
|
||||||
|
mold = require('mold-source-map');
|
||||||
|
|
||||||
return gulp.src('./src/js/main.js', { read: false })
|
return gulp.src('./src/js/main.js', { read: false })
|
||||||
.pipe(errorHandler())
|
.pipe(errorHandler())
|
||||||
@ -81,7 +82,8 @@ gulp.task('browserify', function() {
|
|||||||
|
|
||||||
bundler.add(file.path);
|
bundler.add(file.path);
|
||||||
|
|
||||||
file.contents = bundler.bundle();
|
file.contents = bundler.bundle()
|
||||||
|
.pipe(mold.transformSourcesRelativeTo('./'));
|
||||||
}))
|
}))
|
||||||
.pipe(transform(function() {
|
.pipe(transform(function() {
|
||||||
return exorcist(config.buildPath('js/main.js.map'));
|
return exorcist(config.buildPath('js/main.js.map'));
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
"karma-jasmine": "^0.3.1",
|
"karma-jasmine": "^0.3.1",
|
||||||
"karma-notify-reporter": "^0.1.1",
|
"karma-notify-reporter": "^0.1.1",
|
||||||
"lodash": "^2.4.1",
|
"lodash": "^2.4.1",
|
||||||
|
"mold-source-map": "^0.3.0",
|
||||||
"q": "^1.1.2",
|
"q": "^1.1.2",
|
||||||
"snapsvg": "git://github.com/adobe-webplatform/Snap.svg#dev",
|
"snapsvg": "git://github.com/adobe-webplatform/Snap.svg#dev",
|
||||||
"through": "^2.3.6",
|
"through": "^2.3.6",
|
||||||
|
Loading…
Reference in New Issue
Block a user