mattmodrowski / quenchjs

The Gulp file generator.
http://quenchjs.com
118 stars 10 forks source link

Sourcemaps #6

Closed tinkertrain closed 9 years ago

tinkertrain commented 9 years ago

Sourcemaps generation for css and js would be awesome.

Nice tool btw!

jcready commented 9 years ago

:+1:

ghost commented 9 years ago

:+1:

dewugjeEsc commented 9 years ago

I modified a little bit task 'styles' and now i got sourcemaps working

But no idea if this is proper way to do this but it works

gulp.task('styles', function(){
  gulp.src(['Resources/public/stylesheets/**/*.scss'])
          .pipe(sourcemaps.init())
    .pipe(plumber({
      errorHandler: function (error) {
        console.log(error.message);
        this.emit('end');
    }}))
    .pipe(sass({sourcemap: true}))
    .pipe(autoprefixer('last 2 versions'))
    .pipe(gulp.dest('Resources/public/dist/stylesheets/'))
    .pipe(rename({suffix: '.min'}))
    .pipe(minifycss())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('Resources/public/dist/stylesheets/'))
    .pipe(browserSync.reload({stream:true}))
});

And afcors at the top

var sourcemaps = require('gulp-sourcemaps');
nrdobie commented 9 years ago

:+1:

rawzone commented 9 years ago

@dewugjeEsc works like a charm... This should be added as a option in the generator if you ask me

astanciu commented 9 years ago

I agree that this should be an option... it's a pretty standard feature, imo.