gruntjs / grunt-contrib-watch

Run tasks whenever watched files change.
http://gruntjs.com/
MIT License
1.98k stars 356 forks source link

Allow to specify tasks for option.atBegin #498

Open CupOfTea696 opened 8 years ago

CupOfTea696 commented 8 years ago

Allow to option to pass an array of tasks to run for option.atBegin. This way, certain tasks can be skipped when starting the watch task.

Example config:

        watch: {
            bower: {
                files: ['bower.json'],
                tasks: ['exec:bower_update']
            },
            npm: {
                files: ['package.json'],
                tasks: ['exec:npm_update']
            },
            js: {
                files: ['Gruntfile.js', 'jscs.json', 'src/**/*.js', '!src/js/vendor.js'],
                tasks: ['jshint', 'jscs', 'browserify', 'concat:build', 'uglify:build', 'string-replace:build', 'notify:concat']
            },
            options: {
                atBegin: ['js'],
                spawn: false
            },
        },