Update FAQ

This commit is contained in:
Kyle Robinson Young 2013-10-14 22:08:20 -07:00
parent d984903ece
commit 7a6bfa4bdd
2 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# grunt-contrib-watch [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-watch.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-watch)
# grunt-contrib-watch v0.5.3 [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-watch.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-watch)
> Run predefined tasks whenever watched file patterns are added, changed or deleted.
@ -196,6 +196,7 @@ watch: {
},
```
#### options.cwd
Type: `String|Object`
Default: `process.cwd()`
@ -411,7 +412,7 @@ This is because of your system's max opened file limit. For OSX the default is v
In some versions of OSX the above solution doesn't work. In that case try `launchctl limit maxfiles 10480 10480 ` and restart your terminal. See [here](http://superuser.com/questions/261023/how-to-change-default-ulimit-values-in-mac-os-x-10-6).
#### Can I use this with Grunt v0.3?
Yes. Although `grunt-contrib-watch` is a replacement watch task for Grunt v0.4, version `grunt-contrib-watch@0.1.x` is compatible with Grunt v0.3. `grunt-contrib-watch >= 0.2.x` is **only* compatible and recommended to use with Grunt v0.4.
Yes, `grunt-contrib-watch@0.1.x` is compatible with Grunt v0.3 but highly recommend upgrading instead.
#### Why is the watch devouring all my memory/cpu?
Likely because of an enthusiastic pattern trying to watch thousands of files. Such as `'**/*.js'` but forgetting to exclude the `node_modules` folder with `'!**/node_modules/**'`. Try grouping your files within a subfolder or be more explicit with your file matching pattern.
@ -453,4 +454,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 Sep 11 2013 10:09:16.*
*This file was generated on Mon Oct 14 2013 22:08:04.*

View File

@ -207,7 +207,7 @@ This is because of your system's max opened file limit. For OSX the default is v
In some versions of OSX the above solution doesn't work. In that case try `launchctl limit maxfiles 10480 10480 ` and restart your terminal. See [here](http://superuser.com/questions/261023/how-to-change-default-ulimit-values-in-mac-os-x-10-6).
## Can I use this with Grunt v0.3?
Yes. Although `grunt-contrib-watch` is a replacement watch task for Grunt v0.4, version `grunt-contrib-watch@0.1.x` is compatible with Grunt v0.3. `grunt-contrib-watch >= 0.2.x` is **only* compatible and recommended to use with Grunt v0.4.
Yes, `grunt-contrib-watch@0.1.x` is compatible with Grunt v0.3 but highly recommend upgrading instead.
## Why is the watch devouring all my memory/cpu?
Likely because of an enthusiastic pattern trying to watch thousands of files. Such as `'**/*.js'` but forgetting to exclude the `node_modules` folder with `'!**/node_modules/**'`. Try grouping your files within a subfolder or be more explicit with your file matching pattern.