I'm using the latest versions of sass and compass and using gulp-compass to build. I'm getting .map sourcemap files even though I have set sourcemap=false in my config.rb file and have set the option sourcemap:false in the gulp-compass options. I would like to disable the sourcemaps at times in order to speed up the build. It takes roughly twice the time to run the gulp task when sourcemaps are generated. Any suggestions?
config.rb:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "js"
sourcemap = false
output_style = ":compact"
gulp.js:
gulp.task('compass', function() {
return gulp.src(['sass/screen.scss', 'sass/screen_fallback.scss']).pipe(compass({
config_file: 'config.rb',
css: 'css',
sass: 'sass',
sourcemap: false
})).on('error', function(err) {
notify({
message: err
})
}).pipe(notify({
message: 'Compass processed.'
})).pipe(minifycss()).pipe(rename({
suffix: '.min'
})).pipe(gulp.dest('css')).pipe(notify({
message: 'CSS minified.'
}));
});
You could try just running gulp-ruby-sass with the compass: true option. Here is your task changed to use gulp-ruby-sass:
gulp.task('compass', function() {
return gulp.src(['sass/screen.scss', 'sass/screen_fallback.scss']).pipe(rubysass({
'sourcemap=none': true,
compass: true
})).on('error', function(err) {
notify({
message: err
})
}).pipe(notify({
message: 'Compass processed.'
})).pipe(minifycss()).pipe(rename({
suffix: '.min'
})).pipe(gulp.dest('css')).pipe(notify({
message: 'CSS minified.'
}));
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With