Add a watch task to recompile assets on change

This commit is contained in:
Rowan Manning
2013-11-05 11:34:27 +00:00
parent 6b0cf20e4e
commit 46d9f2ade8
3 changed files with 10 additions and 0 deletions

View File

@@ -27,12 +27,20 @@ module.exports = function (grunt) {
'public/css/main.css': 'public/less/main.less'
}
}
},
watch: {
less: {
files: ['public/less/**/*.less'],
tasks: ['less']
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('compile', ['less']);