Home › Forums › JavaScript › How could grunt compile all of my scss files to css? › Reply To: How could grunt compile all of my scss files to css?
March 18, 2017 at 12:15 pm
#252908
Mottie
Member
Hi Ayala!
It looks like the sass:dev
task is only targeting one file (sites/all/themes/uj/sass/uj.styles.scss
). Try using a globbing pattern to target multiple files.
Also, I’ve usually found it necessary to set the cwd
(current working directory, I think) when working with multiple files. Something like this might work; it’s untested, so it might need some tweaking:
sass: {
dev: {
options: { sourceMap: true },
files: [{
expand: true,
cwd: 'sites/all/themes/uj/',
src: ['sass/*.scss'],
dest: 'css/',
extDot: 'last' // Extensions in filenames begin after this dot
}]
}
}