@@ -60,6 +60,7 @@ var help = [
60
60
' -s, --silent Run the child script silencing stdout and stderr' ,
61
61
' -w, --watch Watch for file changes' ,
62
62
' --watchDirectory Top-level directory to watch from' ,
63
+ ' --watchIgnore To ignore pattern when watch is enabled (multiple option is allowed)' ,
63
64
' -h, --help You\'re staring at it' ,
64
65
'' ,
65
66
'[Long Running Process]' ,
@@ -198,10 +199,13 @@ var getOptions = cli.getOptions = function (file) {
198
199
[
199
200
'pidFile' , 'logFile' , 'errFile' , 'watch' , 'minUptime' , 'append' ,
200
201
'silent' , 'outFile' , 'max' , 'command' , 'path' , 'spinSleepTime' ,
201
- 'sourceDir' , 'uid' , 'watchDirectory' , 'killTree' , 'killSignal'
202
+ 'sourceDir' , 'uid' , 'watchDirectory' , 'watchIgnore' , ' killTree', 'killSignal'
202
203
] . forEach ( function ( key ) {
203
204
options [ key ] = app . config . get ( key ) ;
204
205
} ) ;
206
+
207
+ options . watchIgnore = options . watchIgnore || [ ] ;
208
+ options . watchIgnorePatterns = ( options . watchIgnore instanceof Array ) ? options . watchIgnore : [ options . watchIgnore ] ;
205
209
206
210
if ( ! options . minUptime ) {
207
211
forever . log . warn ( '--minUptime not set. Defaulting to: 1000ms' ) ;
0 commit comments