-
Notifications
You must be signed in to change notification settings - Fork 28
adds sourcemap support #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is great but it won't work with other sourcemaps in the pipeline. Check out how gulp-concat does it - you need to use applySourceMaps |
@contra I added the Flush function where the sourcemapped content is pushed. I was thinking that concat-with-sourcemaps would do the applySourceMaps stuff (as this is how it is done in gulp-concat). Let me know if this seems right. If not, should I use an ast parser and then applySourceMaps? I tested the above in the following task, it seems to work fine. var header = require('gulp-header');
return gulp.src(files)
.pipe(sourcemaps.init())
.pipe(concat('app.js'))
.pipe(header('window.locales = { en: {} }'))
.pipe(gulpif(minify, uglify({ mangle: false })))
.pipe(header(banner, { pkg: pkg }))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest(dist + '/')); |
Ah yeah, concat-with-sourcemaps does handle that - my bad. LGTM |
Ok great! @tracker1 can you review the PR? |
LGTM... |
closes #7 |
@madhums Thanks for your great work on this. |
👍 |
I followed the gulp-concat plugin and added support for sourcemaps.
I had to add concat-with-sourcemaps as a dep.
Please review and let me know if anything has to be changed.