Skip to content

Commit 9084745

Browse files
chore: fmt
1 parent 4e0f5f4 commit 9084745

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

src/constants/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export const NODE_18 = 18;
22
export const JUNO_CDN_URL = 'https://cdn.juno.build';
33
export const CLI_PACKAGE = '@junobuild/cli';
44

5-
export const BOILERPLATE_PATH = '../boilerplate';
5+
export const BOILERPLATE_PATH = '../boilerplate';

src/services/project.services.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const initNewProject = async (args: string[]): Promise<GeneratorInput> =>
4343

4444
const template = nonNullish(userInputs.template) ? userInputs.template : await initTemplate();
4545

46-
const serverlessFunctions = await promptServerlessFunctions();
46+
const serverlessFunctions = await promptServerlessFunctions(template);
4747

4848
const gitHubAction = await promptGitHubAction();
4949

src/services/prompt.services.ts

+16-9
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ export const promptGitHubAction = async (): Promise<boolean> => {
152152
return await confirm(`Would you like to set up a GitHub Action for deployment?`);
153153
};
154154

155-
export const promptServerlessFunctions = async (): Promise<ServerlessFunctions | undefined> => {
155+
export const promptServerlessFunctions = async ({
156+
typeChecking
157+
}: PopulateTemplate): Promise<ServerlessFunctions | undefined> => {
156158
const {type}: {type: ServerlessFunctions | 'none' | undefined} = await prompts({
157159
type: 'select',
158160
name: 'type',
@@ -162,14 +164,19 @@ export const promptServerlessFunctions = async (): Promise<ServerlessFunctions |
162164
title: 'Rust',
163165
value: 'rust'
164166
},
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+
]),
173180
{
174181
title: 'None',
175182
value: 'none'

0 commit comments

Comments
 (0)