@@ -5,6 +5,8 @@ import { isInteractive } from "../common/helpers";
55export class CreateProjectCommand implements ICommand {
66 public enableHooks = false ;
77 public allowedParameters : ICommandParameter [ ] = [ this . $stringParameter ] ;
8+ private static BlankTemplateKey = "Blank" ;
9+ private static BlankTemplateDescription = "A blank app" ;
810 private static HelloWorldTemplateKey = "Hello World" ;
911 private static HelloWorldTemplateDescription = "A Hello World app" ;
1012 private static DrawerTemplateKey = "SideDrawer" ;
@@ -109,11 +111,11 @@ or --js flags.)
109111 let selectedTemplate : string ;
110112 switch ( flavorSelection ) {
111113 case constants . NgFlavorName : {
112- selectedFlavorTemplates . push ( ...this . getNgFlavors ( ) ) ;
114+ selectedFlavorTemplates . push ( ...this . getNgTemplates ( ) ) ;
113115 break ;
114116 }
115117 case constants . VueFlavorName : {
116- selectedFlavorTemplates . push ( { value : "tns-template-blank-vue" } ) ;
118+ selectedFlavorTemplates . push ( ... this . getVueTemplates ( ) ) ;
117119 break ;
118120 }
119121 case constants . TsFlavorName : {
@@ -178,7 +180,7 @@ or --js flags.)
178180 return templates ;
179181 }
180182
181- private getNgFlavors ( ) {
183+ private getNgTemplates ( ) {
182184 const templates = [ {
183185 key : CreateProjectCommand . HelloWorldTemplateKey ,
184186 value : constants . RESERVED_TEMPLATE_NAMES . angular ,
@@ -198,6 +200,21 @@ or --js flags.)
198200 return templates ;
199201 }
200202
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+
201218 public async postCommandAction ( args : string [ ] ) : Promise < void > {
202219 const { projectDir } = this . createdProjectData ;
203220 const relativePath = path . relative ( process . cwd ( ) , projectDir ) ;
0 commit comments