gulp-community / gulp-concat

Streaming concat middleware for gulp
MIT License
792 stars 127 forks source link

Sourcemaps always showing up inline, even when not desired. #103

Closed pkkid closed 9 years ago

pkkid commented 9 years ago

When using sourcemaps with gulp-concat, I'm getting sourcemaps inline as well as alongside the generated js file. Shouldn't they ONLY be in the file generated along side? I also use sourcemaps with gulp-sass/autoprefixer and the sourcemaps are only generated in the file alongside the generated .css files. So I suspect the problem is in gulp-concat and not gulp-sourcemaps.

var gulp = require('gulp');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');

gulp.task('js', function() {
  gulp.src([
      './pk/static/js/particles.js',
      './pk/static/js/init.js',
    ])
    .pipe(sourcemaps.init())
    .pipe(concat('pushingkarma.js', {newLine:'\n\n\n'}))
    .pipe(sourcemaps.write('.'))
    .pipe(gulp.dest('./pk/static/js'));
});
pkkid commented 9 years ago

Ha! -- I must be going crazy. In my setup of gulp I think early on I compiled the JS in place early on with sourcemaps inline. So all later testing was correctly concatenating the files (with old sourcemaps already in them). Sorry for the noise.