File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -44,11 +44,13 @@ export class NewCommand extends SchematicCommand {
44
44
collectionName = this . parseCollectionName ( options ) ;
45
45
}
46
46
47
+ // Register the version of the CLI in the registry.
47
48
const packageJson = require ( '../package.json' ) ;
48
- options . version = packageJson . version ;
49
+ const version = packageJson . version ;
49
50
50
51
// Ensure skipGit has a boolean value.
51
52
options . skipGit = options . skipGit === undefined ? false : options . skipGit ;
53
+ this . _workflow . registry . addSmartDefaultProvider ( 'ng-cli-version' , ( ) => version ) ;
52
54
53
55
return this . runSchematic ( {
54
56
collectionName : collectionName ,
Original file line number Diff line number Diff line change 90
90
"version" : {
91
91
"type" : " string" ,
92
92
"description" : " The version of the Angular CLI to use." ,
93
- "visible" : false
93
+ "visible" : false ,
94
+ "$default" : {
95
+ "$source" : " ng-cli-version"
96
+ }
94
97
},
95
98
"routing" : {
96
99
"type" : " boolean" ,
117
120
}
118
121
},
119
122
"required" : [
120
- " version"
121
123
]
122
124
}
Original file line number Diff line number Diff line change 69
69
"version" : {
70
70
"type" : " string" ,
71
71
"description" : " The version of the Angular CLI to use." ,
72
- "visible" : false
72
+ "visible" : false ,
73
+ "$default" : {
74
+ "$source" : " ng-cli-version"
75
+ }
73
76
}
74
77
},
75
78
"required" : [
You can’t perform that action at this time.
0 commit comments