Skip to content

Instantly share code, notes, and snippets.

@stevenyxu
Created January 22, 2014 01:14
Show Gist options
  • Save stevenyxu/8551836 to your computer and use it in GitHub Desktop.
Save stevenyxu/8551836 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('check', function() {
grunt.log.writeln('Checking!');
});
grunt.registerTask('buildFoo', function() {
grunt.log.writeln('Building Foo!');
});
grunt.registerTask('buildBar', function() {
grunt.log.writeln('Building Bar!');
});
grunt.initConfig({
watch: {
check: {
files: ['*'],
tasks: ['check']
},
foo: {
files: ['foo'],
tasks: ['buildFoo']
},
bar: {
files: ['bar'],
tasks: ['buildBar']
}
}
});
};
{
"name": "Grunttest",
"version": "0.0.1",
"dependencies": {
"grunt": "0.4.1",
"grunt-contrib-watch": "0.4.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment