diff --git a/CHANGELOG b/CHANGELOG index 289a83c..83eb949 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +v0.3.1: + date: 2013-02-28 + changes: + - Fix for top level options. v0.3.0: date: 2013-02-27 changes: diff --git a/README.md b/README.md index 04c3ac5..09f916e 100644 --- a/README.md +++ b/README.md @@ -175,6 +175,7 @@ Spawning does cause a performance hit (usually 500ms for most environments). It ## Release History + * 2013-02-27   v0.3.1   Fix for top level options. * 2013-02-26   v0.3.0   nospawn option added to run tasks without spawning as child processes. Watch emits 'watch' events upon files being triggered with grunt.event. Completion time in seconds and date/time shown after tasks ran. Negate file patterns fixed. Tasks debounced individually to handle simultaneous triggering for multiple targets. Errors handled better and viewable with --stack cli option. Code complexity reduced making the watch task code easier to read. * 2013-02-14   v0.2.0   First official release for Grunt 0.4.0. * 2013-01-17   v0.2.0rc7   Updating grunt/gruntplugin dependencies to rc6. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions. @@ -190,4 +191,4 @@ Spawning does cause a performance hit (usually 500ms for most environments). It Task submitted by [Kyle Robinson Young](http://dontkry.com) -*This file was generated on Wed Feb 27 2013 14:08:02.* +*This file was generated on Thu Feb 28 2013 10:14:13.* diff --git a/package.json b/package.json index 6c831da..5635a1a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-contrib-watch", "description": "Run predefined tasks whenever watched file patterns are added, changed or deleted.", - "version": "0.3.0", + "version": "0.3.1", "homepage": "https://github.com/gruntjs/grunt-contrib-watch", "author": { "name": "Grunt Team", diff --git a/tasks/watch.js b/tasks/watch.js index 272b598..142aff2 100644 --- a/tasks/watch.js +++ b/tasks/watch.js @@ -13,19 +13,20 @@ module.exports = function(grunt) { var Gaze = require('gaze').Gaze; var taskrun = require('./lib/taskrun')(grunt); - // Default options for the watch task - var defaults = { - interrupt: false, - nospawn: false - }; - grunt.registerTask('watch', 'Run predefined tasks whenever watched files change.', function(target) { var name = this.name || 'watch'; this.requiresConfig(name); + // Default options for the watch task + var defaults = this.options({ + interrupt: false, + nospawn: false + }); + // Build an array of files/tasks objects var watch = grunt.config(name); var targets = target ? [target] : Object.keys(watch).filter(function(key) { + if (key === 'options') { return false; } return typeof watch[key] !== 'string' && !Array.isArray(watch[key]); });