Skip to content

Instantly share code, notes, and snippets.

@apfelbox
Created April 3, 2014 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apfelbox/9957261 to your computer and use it in GitHub Desktop.
Save apfelbox/9957261 to your computer and use it in GitHub Desktop.
PoC for grunt sass for symfony config
module.exports = function(grunt) {
var path = require("path");
grunt.loadNpmTasks("grunt-contrib-sass");
grunt.initConfig({
sass: {
bundles: {
options: {
quiet: true
},
files: [{
expand: true,
cwd: "src",
src: ["*/*/Resources/assets/scss/*.scss"],
dest: "public/css",
ext: ".css",
rename: function (dest, matchedSrcPath, options)
{
var fileName = path.basename(matchedSrcPath);
var filePath = matchedSrcPath.replace(/Resources\/.*$/, "Resources/") + dest.replace(/\/*$/, "") + "/";
return filePath + fileName;
}
}]
}
}
});
grunt.registerTask("default", ["sass"]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment