Created
November 14, 2012 00:36
-
-
Save GarthDB/4069410 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({ | |
watch: { | |
scripts: { | |
files: '<config:coffee.compile.files>', | |
tasks: 'coffee' | |
} | |
}, | |
coffee: { | |
compile: { | |
files: { | |
'js/*.js': ['js/*.coffee', '!node_modules/**'] | |
} | |
}, | |
}, | |
jade: { | |
options: { | |
pretty: true | |
}, | |
compile: { | |
files: { | |
'index.html': ['index.jade', '!node_modules/**'] | |
} | |
} | |
}, | |
stylus: { | |
compile: { | |
files: { | |
'css/*.css': ['css/*.styl', '!node_modules/**'] | |
} | |
}, | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib'); | |
// Default task. | |
grunt.registerTask('default', ['coffee', 'jade', 'stylus']); | |
}; |
Err, missing brackets...
Try:
watch: {
scripts: {
files: 'config:coffee.compile.files',
tasks: 'coffee'
}
}
Changed it, still no worky. I think it is because grunt-contrib doesn't use src and destination attributes, instead has the name value pair for both together.
Waiting... An error occurred while processing a template (Object # has no method 'indexOf'). Use --force to continue.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try:
watch: {
scripts: {
files: 'config:coffee.compile.files',
tasks: 'coffee'
}
}