@@ -44,6 +44,8 @@ export class CreateProjectCommand implements ICommand {
4444 selectedTemplate = constants . ANGULAR_NAME ;
4545 } else if ( this . $options . vue ) {
4646 selectedTemplate = constants . VUE_NAME ;
47+ } else if ( this . $options . react ) {
48+ selectedTemplate = constants . REACT_NAME ;
4749 } else {
4850 selectedTemplate = this . $options . template ;
4951 }
@@ -82,6 +84,7 @@ export class CreateProjectCommand implements ICommand {
8284 private async interactiveFlavorSelection ( adverb : string ) {
8385 const flavorSelection = await this . $prompter . promptForDetailedChoice ( `${ adverb } , which style of NativeScript project would you like to use:` , [
8486 { key : constants . NgFlavorName , description : "Learn more at https://nativescript.org/angular" } ,
87+ { key : constants . ReactFlavorName , description : "Learn more at https://github.com/shirakaba/react-nativescript" } ,
8588 { key : constants . VueFlavorName , description : "Learn more at https://nativescript.org/vue" } ,
8689 { key : constants . TsFlavorName , description : "Learn more at https://nativescript.org/typescript" } ,
8790 { key : constants . JsFlavorName , description : "Use NativeScript without any framework" } ,
@@ -96,8 +99,7 @@ export class CreateProjectCommand implements ICommand {
9699 this . $logger . printMarkdown ( `# Let’s create a NativeScript app!` ) ;
97100 this . $logger . printMarkdown ( `
98101Answer the following questions to help us build the right app for you. (Note: you
99- can skip this prompt next time using the --template option, or the --ng, --vue, --ts,
100- or --js flags.)
102+ can skip this prompt next time using the --template option, or the --ng, --react, --vue, --ts, or --js flags.)
101103` ) ;
102104 }
103105 }
@@ -114,6 +116,10 @@ or --js flags.)
114116 selectedFlavorTemplates . push ( ...this . getNgTemplates ( ) ) ;
115117 break ;
116118 }
119+ case constants . ReactFlavorName : {
120+ selectedFlavorTemplates . push ( ...this . getReactTemplates ( ) ) ;
121+ break ;
122+ }
117123 case constants . VueFlavorName : {
118124 selectedFlavorTemplates . push ( ...this . getVueTemplates ( ) ) ;
119125 break ;
@@ -200,6 +206,16 @@ or --js flags.)
200206 return templates ;
201207 }
202208
209+ private getReactTemplates ( ) {
210+ const templates = [ {
211+ key : CreateProjectCommand . HelloWorldTemplateKey ,
212+ value : constants . RESERVED_TEMPLATE_NAMES . react ,
213+ description : CreateProjectCommand . HelloWorldTemplateDescription
214+ } ] ;
215+
216+ return templates ;
217+ }
218+
203219 private getVueTemplates ( ) {
204220 const templates = [ {
205221 key : CreateProjectCommand . BlankTemplateKey ,
0 commit comments