Created
June 23, 2013 06:44
-
-
Save mattacular/5844063 to your computer and use it in GitHub Desktop.
Grunt pattern to name dest after source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'sass': { | |
dist: { | |
// this pattern will recurse through Grunt project directory and look for folders called 'sass' | |
// it then looks inside the 'sass' folder for any files with extensive '*.scss' and converts them | |
// to a CSS file named the same except located in '../css/*.css' | |
files: grunt.file.expandMapping(['**/sass/*.scss'], 'css', { | |
rename: function (dest, matched) { | |
return matched.replace(/\/sass\//, '/' + dest + '/').replace(/\.scss$/, '.css'); | |
} | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment