Extracting sourcemap from compiled JS file

This commit is contained in:
Jeff Avallone 2014-11-30 09:58:27 -05:00
parent facb99e8bc
commit 57c0de7668
2 changed files with 9 additions and 2 deletions

View File

@ -57,7 +57,9 @@ gulp.task('compass', function() {
gulp.task('browserify', function() {
var browserify = require('browserify'),
es6ify = require('es6ify'),
tap = require('gulp-tap');
exorcist = require('exorcist'),
tap = require('gulp-tap'),
transform = require('vinyl-transform');
return gulp.src('./src/js/main.js', { read: false })
.pipe(errorHandler())
@ -70,6 +72,9 @@ gulp.task('browserify', function() {
file.contents = bundler.bundle();
}))
.pipe(transform(function() {
return exorcist('./build/js/main.js.map');
}))
.pipe(gulp.dest('./build/js'));
});

View File

@ -13,6 +13,7 @@
"browserify": "^6.3.2",
"canopy": "^0.2.0",
"es6ify": "^1.5.1",
"exorcist": "^0.1.6",
"gulp": "^3.8.10",
"gulp-compass": "^2.0.3",
"gulp-connect": "^2.2.0",
@ -27,6 +28,7 @@
"karma-notify-reporter": "^0.1.1",
"karma-phantomjs-launcher": "^0.1.4",
"lodash": "^2.4.1",
"through": "^2.3.6"
"through": "^2.3.6",
"vinyl-transform": "^1.0.0"
}
}