I'm using grunt-contrib-compass
to process my .SCSS
files
compass: {
dist: {
options: {
cssDir: 'www/styles',
sassDir: 'www/styles',
imagesDir: 'www/images',
javascriptsDir: 'www/scripts',
force: true
}
}
},
And I'm using grunt-contrib-watch
to watch which file has been changed.
watch: {
compass: {
files: [
'www/styles/**/*.{scss,sass}'
],
tasks: ['compass']
}
}
After generting the .CSS
files, I want to minify it using grunt-contrib-cssmin
. But when I do it like tasks: ['compass', 'cssmin']
, the second time I need to minify the file, it doesn't override it, it appends instead. So if the first time the file is 10kb, the next time I save it become 20kb and so on and so on..
What's the correct way of doing it?