From 57c0de7668cfe2810ac0455304315420fb6f228d Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Sun, 30 Nov 2014 09:58:27 -0500 Subject: [PATCH] Extracting sourcemap from compiled JS file --- gulpfile.js | 7 ++++++- package.json | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 0a798ed..5c5c054 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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')); }); diff --git a/package.json b/package.json index 778bebf..ba9de71 100644 --- a/package.json +++ b/package.json @@ -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" } }