Reputation: 159
I'm using grunt to manage my front end web app, and wondering if there's any way of speeding up its precompile process. It takes around 2sec to compile the LESS file (including bootstrap), and to me it would make sense if the bootstrap.less didn't need to be recompiled each time. Maybe it is already cached by default, but is there any way of speeding the build up?
Gruntfile sample:
grunt.initConfig({
watch: {
haml: {
files: '*.haml',
tasks: ['haml'],
options: {
livereload: true,
},
},
js: {
files: ['*.js'],
tasks: [],
options: {
livereload: true,
}
},
css: {
files: ['*.css'],
tasks: [],
options: {
livereload: true,
}
},
less: {
files: ['style.less'],
tasks: ['less'],
},
},
Upvotes: 0
Views: 203
Reputation: 139
You got to check out grunt-newer
to configure Grunt tasks to run only when files have changed.
See https://github.com/tschaub/grunt-newer
Upvotes: 1