Disabling compass / scss datasource maps
I am using the latest sass and compass and using gulp-compass to build. I am getting .map
sourcemap files even though I set sourcemap=false
in config.rb and set option sourcemap:false
in gulp -compass options. I would like to sometimes turn off the sources to speed up the build. It takes roughly twice as long to run a gulp task when generating source maps. 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.'
}));
});
+3
source to share
1 answer
You can try to just run gulp-ruby-sass with the option compass: true
. Here's 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.'
}));
});
+2
source to share