@@ -5,6 +5,8 @@ import { isInteractive } from "../common/helpers";
5
5
export class CreateProjectCommand implements ICommand {
6
6
public enableHooks = false ;
7
7
public allowedParameters : ICommandParameter [ ] = [ this . $stringParameter ] ;
8
+ private static BlankTemplateKey = "Blank" ;
9
+ private static BlankTemplateDescription = "A blank app" ;
8
10
private static HelloWorldTemplateKey = "Hello World" ;
9
11
private static HelloWorldTemplateDescription = "A Hello World app" ;
10
12
private static DrawerTemplateKey = "SideDrawer" ;
@@ -109,11 +111,11 @@ or --js flags.)
109
111
let selectedTemplate : string ;
110
112
switch ( flavorSelection ) {
111
113
case constants . NgFlavorName : {
112
- selectedFlavorTemplates . push ( ...this . getNgFlavors ( ) ) ;
114
+ selectedFlavorTemplates . push ( ...this . getNgTemplates ( ) ) ;
113
115
break ;
114
116
}
115
117
case constants . VueFlavorName : {
116
- selectedFlavorTemplates . push ( { value : "tns-template-blank-vue" } ) ;
118
+ selectedFlavorTemplates . push ( ... this . getVueTemplates ( ) ) ;
117
119
break ;
118
120
}
119
121
case constants . TsFlavorName : {
@@ -178,7 +180,7 @@ or --js flags.)
178
180
return templates ;
179
181
}
180
182
181
- private getNgFlavors ( ) {
183
+ private getNgTemplates ( ) {
182
184
const templates = [ {
183
185
key : CreateProjectCommand . HelloWorldTemplateKey ,
184
186
value : constants . RESERVED_TEMPLATE_NAMES . angular ,
@@ -198,6 +200,21 @@ or --js flags.)
198
200
return templates ;
199
201
}
200
202
203
+ private getVueTemplates ( ) {
204
+ const templates = [ {
205
+ key : CreateProjectCommand . BlankTemplateKey ,
206
+ value : "tns-template-blank-vue" ,
207
+ description : CreateProjectCommand . BlankTemplateDescription
208
+ } ,
209
+ {
210
+ key : CreateProjectCommand . DrawerTemplateKey ,
211
+ value : "tns-template-drawer-navigation-vue" ,
212
+ description : CreateProjectCommand . DrawerTemplateDescription
213
+ } ] ;
214
+
215
+ return templates ;
216
+ }
217
+
201
218
public async postCommandAction ( args : string [ ] ) : Promise < void > {
202
219
const { projectDir } = this . createdProjectData ;
203
220
const relativePath = path . relative ( process . cwd ( ) , projectDir ) ;
0 commit comments