File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 5757 "type" : " boolean" ,
5858 "default" : " true" ,
5959 "description" : " Disables interactive inputs (i.e., prompts)."
60+ },
61+ "defaults" : {
62+ "type" : " boolean" ,
63+ "default" : " false" ,
64+ "description" : " Disables interactive inputs (i.e., prompts) for options with a default."
6065 }
6166 }
6267 }
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ export interface BaseSchematicOptions extends BaseCommandOptions {
5353 dryRun ?: boolean ;
5454 force ?: boolean ;
5555 interactive ?: boolean ;
56+ defaults ?: boolean ;
5657}
5758
5859export interface RunSchematicOptions {
@@ -234,7 +235,11 @@ export abstract class SchematicCommand<
234235
235236 this . _engineHost . registerOptionsTransform ( validateOptionsWithSchema ( workflow . registry ) ) ;
236237
237- workflow . registry . addPostTransform ( schema . transforms . addUndefinedDefaults ) ;
238+ if ( options . defaults ) {
239+ workflow . registry . addPreTransform ( schema . transforms . addUndefinedDefaults ) ;
240+ } else {
241+ workflow . registry . addPostTransform ( schema . transforms . addUndefinedDefaults ) ;
242+ }
238243
239244 workflow . registry . addSmartDefaultProvider ( 'projectName' , ( ) => {
240245 if ( this . _workspace ) {
You can’t perform that action at this time.
0 commit comments