From 581de53f315c8999b1ebdb8a832b354b95be9465 Mon Sep 17 00:00:00 2001 From: OrJDev Date: Sun, 13 Nov 2022 18:36:52 +0200 Subject: [PATCH] minor flag fixes --- package.json | 2 +- src/utils/project.ts | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index dd4c533..d8969ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "create-jd-app", - "version": "1.0.79", + "version": "1.0.80", "main": "dist/index.js", "scripts": { "test": "ts-node -r tsconfig-paths/register src", diff --git a/src/utils/project.ts b/src/utils/project.ts index 8d3554a..ba29b7c 100644 --- a/src/utils/project.ts +++ b/src/utils/project.ts @@ -55,15 +55,20 @@ export async function initApp(args: string[]): Promise { process.exit(1); } } - let vercel = - args.includes("vercel") || - ( - await inquirer.prompt<{ vercel: boolean }>({ - name: "vercel", - type: "confirm", - message: "Will you deploy this project to vercel?", - }) - ).vercel; + let vercel = false; + if (args.includes("skip")) { + vercel = args.includes("vercel"); + } else { + vercel = + args.includes("vercel") || + ( + await inquirer.prompt<{ vercel: boolean }>({ + name: "vercel", + type: "confirm", + message: "Will you deploy this project to vercel?", + }) + ).vercel; + } return { appName, userDir,