I'm trying to work out how to compile a single file as well as a directory and for the life of me I cannot get it to work.
sass: {
dev: {
options: {
style: 'expanded'
},
files: [
{'style.css': 'style.scss'},
{
expand: true,
cwd: '/scss/',
src: '*.scss',
dest: '/css',
ext: '.css'
}]
}
}
This only seems to compile the style.css and ignores the directory.
Because of WordPress' weird requirements, having the style.css file separate (one level up) from the CSS directory is quite common. An example would also be useful for compiling multiple directories too.
I assumed that to work too. It might be a bug in grunt. Feel free to open a ticket.
You can use multiple targets to work around it in the meantime:
sass: {
options: {
style: 'expanded'
},
dev: {
files: [{
expand: true,
cwd: '/scss/',
src: '*.scss',
dest: '/css',
ext: '.css'
}]
},
dev2: {
files: [{'style.css': 'style.scss'}]
}
}
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