@@ -62,7 +62,10 @@ let commands = {
62
62
args : {
63
63
'--input' : { type : String , description : 'Input file' } ,
64
64
'--output' : { type : String , description : 'Output file' } ,
65
- '--watch' : { type : Boolean , description : 'Watch for changes and rebuild as needed' } ,
65
+ '--watch' : {
66
+ type : oneOf ( String , Boolean ) ,
67
+ description : 'Watch for changes and rebuild as needed' ,
68
+ } ,
66
69
'--poll' : {
67
70
type : Boolean ,
68
71
description : 'Use polling instead of filesystem events when watching' ,
@@ -175,13 +178,13 @@ let args = (() => {
175
178
176
179
// --flag value syntax was used so we need to pull `value` from `args`
177
180
if ( flagValue === undefined ) {
178
- // Parse args for current flag
179
- while ( result [ '_' ] [ offset ] && ! result [ '_' ] [ offset ] . startsWith ( '-' ) ) {
180
- args . push ( result [ '_' ] [ offset ++ ] )
181
- }
181
+ // Parse args for current flag
182
+ while ( result [ '_' ] [ offset ] && ! result [ '_' ] [ offset ] . startsWith ( '-' ) ) {
183
+ args . push ( result [ '_' ] [ offset ++ ] )
184
+ }
182
185
183
- // Cleanup manually parsed flags + args
184
- result [ '_' ] . splice ( i , 1 + args . length )
186
+ // Cleanup manually parsed flags + args
187
+ result [ '_' ] . splice ( i , 1 + args . length )
185
188
186
189
// No args were provided, use default value defined in handler
187
190
// One arg was provided, use that directly
0 commit comments