@@ -36,8 +36,9 @@ const setOptions = (program, definitions, terms) => {
3636
3737const createProgram = ( program , definitions , terms ) => {
3838 return setOptions ( program , definitions , terms )
39- . option ( `-d, --dry-run` , 'run dry-run mode' )
40- . option ( `-i, --interactive` , 'run interactive mode' )
39+ . option ( `-d, --dry-run` , 'run dry-run mode' , false )
40+ . option ( `-i, --interactive` , 'run interactive mode' , false )
41+ . option ( `-s, --skip-options` , 'skip not required term input (interactive mode only)' , false )
4142 . version ( version )
4243 . parse ( process . argv )
4344}
@@ -109,7 +110,11 @@ const replaceTerm = (program, template, definition, term) => {
109110
110111 if ( program . interactive ) {
111112 if ( _ . isUndefined ( value ) ) {
112- value = input ( term , definition )
113+ if ( definition . required || ! program . skipOptions ) {
114+ value = input ( term , definition )
115+ } else {
116+ value = ''
117+ }
113118 while ( definition . required && _ . isEmpty ( value ) ) {
114119 console . log ( `${ term } is required` )
115120 value = input ( term , definition )
0 commit comments