mikach / gulp-concat-sourcemap

Concatenate files and generate a source map file.
30 stars 9 forks source link

Use with gulp-sourcemaps? #11

Open evillemez opened 10 years ago

evillemez commented 10 years ago

I just want to clarify that this is in fact the plugin the community should be using in conjunction with gulp-sourcemaps. From scanning the code, this seems to be the case - but I'm not entirely sure. The state of sourcemaps is a little hard to follow at the moment.

Is this generally what I should be doing?

var gulp = require('gulp')
  , coffee = require('gulp-coffee')
  , concat = require('gulp-concat-sourcemap')
  , gutil = require('gulp-util')
;

gulp.task('build', function() {
  gulp.src('**/*.coffee')
      .pipe(sourcemaps.init())
        .pipe(coffee({bare: true})).on('error', gutil.log)
        .pipe(concat('bundle.js', {sourcesContent: true})).on('error', gutil.log)
      .pipe(sourcemaps.write())
      .pipe(gulp.dest(target));
});
ghost commented 10 years ago

any clue on this? I'm not sure how to make sourcemaps work properly with coffeescript!