@@ -15,6 +15,8 @@ export class CreateProjectCommand implements ICommand {
15
15
private static BlankTemplateDescription = "A blank app" ;
16
16
private static BlankTsTemplateKey = "Blank Typescript" ;
17
17
private static BlankTsTemplateDescription = "A blank typescript app" ;
18
+ private static BlankVisionTemplateKey = "visionOS" ;
19
+ private static BlankVisionTemplateDescription = "A visionOS app" ;
18
20
private static HelloWorldTemplateKey = "Hello World" ;
19
21
private static HelloWorldTemplateDescription = "A Hello World app" ;
20
22
private static DrawerTemplateKey = "SideDrawer" ;
@@ -72,6 +74,16 @@ export class CreateProjectCommand implements ICommand {
72
74
selectedTemplate = constants . REACT_NAME ;
73
75
} else if ( this . $options . svelte ) {
74
76
selectedTemplate = constants . SVELTE_NAME ;
77
+ } else if ( this . $options [ "vision-ng" ] ) {
78
+ selectedTemplate = constants . RESERVED_TEMPLATE_NAMES [ "vision-ng" ] ;
79
+ } else if ( this . $options [ "vision-react" ] ) {
80
+ selectedTemplate = constants . RESERVED_TEMPLATE_NAMES [ "vision-react" ] ;
81
+ } else if ( this . $options [ "vision-solid" ] ) {
82
+ selectedTemplate = constants . RESERVED_TEMPLATE_NAMES [ "vision-solid" ] ;
83
+ } else if ( this . $options [ "vision-svelte" ] ) {
84
+ selectedTemplate = constants . RESERVED_TEMPLATE_NAMES [ "vision-svelte" ] ;
85
+ } else if ( this . $options [ "vision-vue" ] ) {
86
+ selectedTemplate = constants . RESERVED_TEMPLATE_NAMES [ "vision-vue" ] ;
75
87
} else {
76
88
selectedTemplate = this . $options . template ;
77
89
}
@@ -262,6 +274,11 @@ can skip this prompt next time using the --template option, or the --ng, --react
262
274
value : "@nativescript/template-tab-navigation-ts" ,
263
275
description : CreateProjectCommand . TabsTemplateDescription ,
264
276
} ,
277
+ {
278
+ key : CreateProjectCommand . BlankVisionTemplateKey ,
279
+ value : "@nativescript/template-hello-world-ts-vision" ,
280
+ description : CreateProjectCommand . BlankVisionTemplateDescription ,
281
+ } ,
265
282
] ;
266
283
267
284
return templates ;
@@ -284,6 +301,11 @@ can skip this prompt next time using the --template option, or the --ng, --react
284
301
value : "@nativescript/template-tab-navigation-ng" ,
285
302
description : CreateProjectCommand . TabsTemplateDescription ,
286
303
} ,
304
+ {
305
+ key : CreateProjectCommand . BlankVisionTemplateKey ,
306
+ value : "@nativescript/template-hello-world-ng-vision" ,
307
+ description : CreateProjectCommand . BlankVisionTemplateDescription ,
308
+ } ,
287
309
] ;
288
310
289
311
return templates ;
@@ -296,6 +318,11 @@ can skip this prompt next time using the --template option, or the --ng, --react
296
318
value : constants . RESERVED_TEMPLATE_NAMES . react ,
297
319
description : CreateProjectCommand . HelloWorldTemplateDescription ,
298
320
} ,
321
+ {
322
+ key : CreateProjectCommand . BlankVisionTemplateKey ,
323
+ value : "@nativescript/template-blank-react-vision" ,
324
+ description : CreateProjectCommand . BlankVisionTemplateDescription ,
325
+ } ,
299
326
] ;
300
327
301
328
return templates ;
@@ -308,6 +335,11 @@ can skip this prompt next time using the --template option, or the --ng, --react
308
335
value : constants . RESERVED_TEMPLATE_NAMES . svelte ,
309
336
description : CreateProjectCommand . HelloWorldTemplateDescription ,
310
337
} ,
338
+ {
339
+ key : CreateProjectCommand . BlankVisionTemplateKey ,
340
+ value : "@nativescript/template-blank-svelte-vision" ,
341
+ description : CreateProjectCommand . BlankVisionTemplateDescription ,
342
+ } ,
311
343
] ;
312
344
313
345
return templates ;
@@ -335,6 +367,11 @@ can skip this prompt next time using the --template option, or the --ng, --react
335
367
value : "@nativescript/template-tab-navigation-vue" ,
336
368
description : CreateProjectCommand . TabsTemplateDescription ,
337
369
} ,
370
+ {
371
+ key : CreateProjectCommand . BlankVisionTemplateKey ,
372
+ value : "@nativescript/template-blank-vue-vision" ,
373
+ description : CreateProjectCommand . BlankVisionTemplateDescription ,
374
+ } ,
338
375
] ;
339
376
340
377
return templates ;
@@ -346,6 +383,33 @@ can skip this prompt next time using the --template option, or the --ng, --react
346
383
347
384
const greyDollarSign = color . grey ( "$" ) ;
348
385
this . $logger . clearScreen ( ) ;
386
+ let runDebugNotes : Array < string > = [ ] ;
387
+ if (
388
+ this . $options . vision ||
389
+ this . $options [ "vision-ng" ] ||
390
+ this . $options [ "vision-react" ] ||
391
+ this . $options [ "vision-solid" ] ||
392
+ this . $options [ "vision-svelte" ] ||
393
+ this . $options [ "vision-vue" ]
394
+ ) {
395
+ runDebugNotes = [
396
+ `Run the project on Vision Pro with:` ,
397
+ "" ,
398
+ ` ${ greyDollarSign } ${ color . green ( "ns run visionos --no-hmr" ) } ` ,
399
+ ] ;
400
+ } else {
401
+ runDebugNotes = [
402
+ `Run the project on multiple devices:` ,
403
+ "" ,
404
+ ` ${ greyDollarSign } ${ color . green ( "ns run ios" ) } ` ,
405
+ ` ${ greyDollarSign } ${ color . green ( "ns run android" ) } ` ,
406
+ "" ,
407
+ "Debug the project with Chrome DevTools:" ,
408
+ "" ,
409
+ ` ${ greyDollarSign } ${ color . green ( "ns debug ios" ) } ` ,
410
+ ` ${ greyDollarSign } ${ color . green ( "ns debug android" ) } ` ,
411
+ ] ;
412
+ }
349
413
this . $logger . info (
350
414
[
351
415
[
@@ -358,15 +422,7 @@ can skip this prompt next time using the --template option, or the --ng, --react
358
422
`cd ${ relativePath } `
359
423
) } and then:`,
360
424
"" ,
361
- `Run the project on multiple devices:` ,
362
- "" ,
363
- ` ${ greyDollarSign } ${ color . green ( "ns run ios" ) } ` ,
364
- ` ${ greyDollarSign } ${ color . green ( "ns run android" ) } ` ,
365
- "" ,
366
- "Debug the project with Chrome DevTools:" ,
367
- "" ,
368
- ` ${ greyDollarSign } ${ color . green ( "ns debug ios" ) } ` ,
369
- ` ${ greyDollarSign } ${ color . green ( "ns debug android" ) } ` ,
425
+ ...runDebugNotes ,
370
426
`` ,
371
427
`For more options consult the docs or run ${ color . green ( "ns --help" ) } ` ,
372
428
"" ,
0 commit comments