Skip to content

Instantly share code, notes, and snippets.

@GarthDB
Created November 14, 2012 00:36
Show Gist options
  • Save GarthDB/4069410 to your computer and use it in GitHub Desktop.
Save GarthDB/4069410 to your computer and use it in GitHub Desktop.
Fixme Grunt!
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']);
};
@s9tpepper
Copy link

Err, missing brackets...

Try:
watch: {
scripts: {
files: 'config:coffee.compile.files',
tasks: 'coffee'
}
}

@GarthDB
Copy link
Author

GarthDB commented Nov 14, 2012

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