Saturday, 15 February 2014

gruntjs - Grunt default task only runs first task in the list -



gruntjs - Grunt default task only runs first task in the list -

i'm getting started grunt , trying few basic tasks working. here's gruntfile:

module.exports = function(grunt) { grunt.initconfig({ compass: { dist: { options: { config: 'config.rb', watch: true } } }, livecopy: { your_target: { options: { source: "c:/websites/xxx/styles/screen.css", target: "w:/websites/xxx/styles/screen.css" }, }, }, watch: { assets: { files: ['**//*.css', '**/*.js'], options: { livereload: true, }, }, }, }); grunt.loadnpmtasks('grunt-contrib-compass'); grunt.loadnpmtasks('grunt-contrib-watch'); grunt.loadnpmtasks('grunt-livecopy'); grunt.task.registertask('default', ['compass','livecopy','watch']); };

i can run each of these tasks individually without issues. when run grunt default task, first task in default task list runs. doesn't matter order in, first 1 runs.

what missing?

when run compass watch alternative runs compass watch blocking task. grunt-contrib-compass docs:

watch

type: boolean

runs compass watch instead of compass compile. utilize compass' native watch command hear changes sass files , recompile css on changes. while much faster running compass compile each time want compile sass, compass becomes blocking task. means if utilize in conjunction blocking task, such watch, need utilize in conjunction paralleling task such grunt-concurrent.

gruntjs

No comments:

Post a Comment