Snippet from gruntfile.js
sass: {
compile: {
files: [{
expand: true,
cwd: 'css/',
src: ['^[^_].scss'],
dest: '../css/',
ext: '.css'
}]
}
},
This should work according to rubular.
Basically I want to compile all .scss files in the 'css' directory, unless they start with an underscore. However, that pattern doesn't match anything?
Any ideas?
Try this pattern:
['*.scss', '!_*.scss']
. It'll make the distinction more explicit, too.If you want to match recursively (files in subfolders of
cwd
), use**/*
Learn more about Grunt Globbing Patterns, which aren't the same as regular expressions.