Last active
August 29, 2015 14:05
-
-
Save michsch/dba1b94337735577ad33 to your computer and use it in GitHub Desktop.
Grunt configuration to copy CSS files and change the filename extension to SCSS.
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
/** | |
* http://gotofritz.net/blog/geekery/rename-files-while-copying-grunt/ | |
*/ | |
module.exports = function( grunt ) { | |
"use strict"; | |
grunt.initConfig({ | |
//copy all css files to sass directory, and rename to .scss | |
copy: { | |
getSCSSFromCSS: { | |
files: [ | |
{ | |
expand: true, | |
cwd: 'path/to/css/', | |
src: ['**/*.css'], | |
dest: 'path/to/sass/', | |
rename: function(dest, src) { | |
return dest + src.replace(/\.css$/, ".scss"); | |
} | |
} | |
] | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-copy'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment