-
-
Save s9tpepper/4069500 to your computer and use it in GitHub Desktop.
Fixme Grunt!
This file contains 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
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
coffeeFiles: ['js/*.coffee', '!node_modules/**'], | |
cssFiles: ['css/*.styl', '!node_modules/**'], | |
watch: { | |
scripts: { | |
files: '<config:coffeeFiles>', | |
tasks: 'coffee' | |
}, | |
styles: { | |
files: '<config:cssFiles>', | |
tasks: 'stylus' | |
} | |
}, | |
coffee: { | |
compile: { | |
files: { | |
'js/*.js': '<config:coffeeFiles>' | |
} | |
}, | |
}, | |
jade: { | |
options: { | |
pretty: true | |
}, | |
compile: { | |
files: { | |
'index.html': ['index.jade', '!node_modules/**'] | |
} | |
} | |
}, | |
stylus: { | |
compile: { | |
files: { | |
'css/*.css': '<config:cssFiles>' | |
} | |
}, | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib'); | |
// Default task. | |
grunt.registerTask('default', ['coffee', 'jade', 'stylus']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I haven't done this before cause I don't use CS, but I'd try this next, using an arbitrary property in the config object.