@@ -16,7 +16,6 @@ let contractName: string = "";
16
16
let projectPath : string = "" ;
17
17
let projectType : string = "" ;
18
18
let framework : string = "" ;
19
- let language : string = "" ;
20
19
let baseContract : string = "" ;
21
20
let chain : string = "" ;
22
21
let createExtension : boolean = false ;
@@ -47,55 +46,41 @@ export async function twCreate(
47
46
if ( ! projectType && Object . keys ( options ) . length > 0 ) {
48
47
if ( options . react ) {
49
48
projectType = "app" ;
50
- language = "typescript" ;
51
49
framework = "cra" ;
52
50
}
53
51
54
52
if ( options . next ) {
55
53
projectType = "app" ;
56
- language = "typescript" ;
57
54
framework = "next" ;
58
55
}
59
56
60
57
if ( options . vite ) {
61
58
projectType = "app" ;
62
- language = "typescript" ;
63
59
framework = "vite" ;
64
60
}
65
61
66
62
if ( options . node ) {
67
63
projectType = "app" ;
68
- language = "typescript" ;
69
64
framework = "node" ;
70
65
}
71
66
72
67
if ( options . express ) {
73
68
projectType = "app" ;
74
- language = "typescript" ;
75
69
framework = "express" ;
76
70
}
77
71
78
72
if ( options . pwaVite ) {
79
73
projectType = "app" ;
80
- language = "typescript" ;
81
74
framework = "pwa-vite" ;
82
75
}
83
76
84
77
if ( options . reactNative ) {
85
78
projectType = "app" ;
86
- language = "typescript" ;
87
79
framework = "react-native" ;
88
80
}
89
81
}
90
82
91
83
if ( projectType === "app" ) {
92
- if ( options . typescript ) {
93
- language = "typescript" ;
94
- }
95
- if ( options . javascript ) {
96
- language = "javascript" ;
97
- }
98
-
99
84
if ( options . next ) {
100
85
framework = "next" ;
101
86
}
@@ -111,9 +96,6 @@ export async function twCreate(
111
96
if ( options . express ) {
112
97
framework = "express" ;
113
98
}
114
- if ( options . reactNative ) {
115
- framework = "react-native" ;
116
- }
117
99
if ( options . pwaVite ) {
118
100
framework = "pwa-vite" ;
119
101
}
@@ -261,7 +243,6 @@ export async function twCreate(
261
243
{ title : "Create React App" , value : "cra" } ,
262
244
{ title : "Vite" , value : "vite" } ,
263
245
{ title : "PWA Vite" , value : "pwa-vite" } ,
264
- { title : "React Native" , value : "react-native" } ,
265
246
{ title : "Node.js" , value : "node" } ,
266
247
{ title : "Express" , value : "express" } ,
267
248
] ,
@@ -272,40 +253,6 @@ export async function twCreate(
272
253
}
273
254
}
274
255
275
- if ( projectType === "app" && ! language ) {
276
- if ( framework === "react-native" ) {
277
- const res = await prompts ( {
278
- type : "select" ,
279
- name : "project" ,
280
- message : CREATE_MESSAGES . reactNative ,
281
- choices : [
282
- { title : "Expo Project" , value : "expo" } ,
283
- { title : "React Native CLI" , value : "typescript" } ,
284
- ] ,
285
- } ) ;
286
-
287
- if ( typeof res . project === "string" ) {
288
- language = res . project . trim ( ) ;
289
- }
290
- } else if ( framework === "pwa-vite" || framework === "pwa-next" ) {
291
- language = "typescript" ;
292
- } else {
293
- const res = await prompts ( {
294
- type : "select" ,
295
- name : "language" ,
296
- message : CREATE_MESSAGES . language ,
297
- choices : [
298
- { title : "JavaScript" , value : "javascript" } ,
299
- { title : "TypeScript" , value : "typescript" } ,
300
- ] ,
301
- } ) ;
302
-
303
- if ( typeof res . language === "string" ) {
304
- language = res . language . trim ( ) ;
305
- }
306
- }
307
- }
308
-
309
256
if (
310
257
( projectType === "contract" || projectType === "extension" ) &&
311
258
framework !== "forge" &&
@@ -330,11 +277,6 @@ export async function twCreate(
330
277
console . log ( "Please specify a framework" ) ;
331
278
process . exit ( 1 ) ;
332
279
}
333
-
334
- if ( ! language ) {
335
- // Default = JavaScript
336
- language = "javascript" ;
337
- }
338
280
}
339
281
}
340
282
@@ -483,7 +425,6 @@ export async function twCreate(
483
425
appPath : projectPath ,
484
426
packageManager,
485
427
framework,
486
- language,
487
428
template,
488
429
} ) ;
489
430
} else {
0 commit comments