File tree 3 files changed +18
-11
lines changed
3 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ export const NODE_18 = 18;
2
2
export const JUNO_CDN_URL = 'https://cdn.juno.build' ;
3
3
export const CLI_PACKAGE = '@junobuild/cli' ;
4
4
5
- export const BOILERPLATE_PATH = '../boilerplate' ;
5
+ export const BOILERPLATE_PATH = '../boilerplate' ;
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export const initNewProject = async (args: string[]): Promise<GeneratorInput> =>
43
43
44
44
const template = nonNullish ( userInputs . template ) ? userInputs . template : await initTemplate ( ) ;
45
45
46
- const serverlessFunctions = await promptServerlessFunctions ( ) ;
46
+ const serverlessFunctions = await promptServerlessFunctions ( template ) ;
47
47
48
48
const gitHubAction = await promptGitHubAction ( ) ;
49
49
Original file line number Diff line number Diff line change @@ -152,7 +152,9 @@ export const promptGitHubAction = async (): Promise<boolean> => {
152
152
return await confirm ( `Would you like to set up a GitHub Action for deployment?` ) ;
153
153
} ;
154
154
155
- export const promptServerlessFunctions = async ( ) : Promise < ServerlessFunctions | undefined > => {
155
+ export const promptServerlessFunctions = async ( {
156
+ typeChecking
157
+ } : PopulateTemplate ) : Promise < ServerlessFunctions | undefined > => {
156
158
const { type} : { type : ServerlessFunctions | 'none' | undefined } = await prompts ( {
157
159
type : 'select' ,
158
160
name : 'type' ,
@@ -162,14 +164,19 @@ export const promptServerlessFunctions = async (): Promise<ServerlessFunctions |
162
164
title : 'Rust' ,
163
165
value : 'rust'
164
166
} ,
165
- {
166
- title : 'TypeScript (experimental)' ,
167
- value : 'ts'
168
- } ,
169
- {
170
- title : 'JavaScript (experimental)' ,
171
- value : 'js'
172
- } ,
167
+ ...( typeChecking
168
+ ? [
169
+ {
170
+ title : 'TypeScript (experimental)' ,
171
+ value : 'ts'
172
+ }
173
+ ]
174
+ : [
175
+ {
176
+ title : 'JavaScript (experimental)' ,
177
+ value : 'js'
178
+ }
179
+ ] ) ,
173
180
{
174
181
title : 'None' ,
175
182
value : 'none'
You can’t perform that action at this time.
0 commit comments