Enable nospawn in compiling files as needed example.
This commit is contained in:
parent
2f68b0567b
commit
a45fdcc47a
@ -208,6 +208,9 @@ grunt.initConfig({
|
||||
scripts: {
|
||||
files: ['lib/*.js'],
|
||||
tasks: ['jshint'],
|
||||
options: {
|
||||
nospawn: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
jshint: {
|
||||
@ -221,6 +224,8 @@ grunt.event.on('watch', function(action, filepath) {
|
||||
});
|
||||
```
|
||||
|
||||
If you need to dynamically modify your config, the `nospawn` option must be enabled to keep the watch running under the same context.
|
||||
|
||||
If you save multiple files simultaneously you may opt for a more robust method:
|
||||
|
||||
```js
|
||||
@ -340,4 +345,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 Thu May 09 2013 14:54:44.*
|
||||
*This file was generated on Fri May 10 2013 09:32:35.*
|
||||
|
@ -57,6 +57,9 @@ grunt.initConfig({
|
||||
scripts: {
|
||||
files: ['lib/*.js'],
|
||||
tasks: ['jshint'],
|
||||
options: {
|
||||
nospawn: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
jshint: {
|
||||
@ -70,6 +73,8 @@ grunt.event.on('watch', function(action, filepath) {
|
||||
});
|
||||
```
|
||||
|
||||
If you need to dynamically modify your config, the `nospawn` option must be enabled to keep the watch running under the same context.
|
||||
|
||||
If you save multiple files simultaneously you may opt for a more robust method:
|
||||
|
||||
```js
|
||||
|
Loading…
Reference in New Issue
Block a user