From 4e74f006a67da0626cf5f4ae98289bae100cbf8e Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <2022kuec2045@iiitkota.ac.in> Date: Wed, 24 Apr 2024 22:46:38 +0530 Subject: [PATCH 1/2] changing conditions --- src/commands/init/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/init/index.ts b/src/commands/init/index.ts index 5cb7ce1f..722e7396 100644 --- a/src/commands/init/index.ts +++ b/src/commands/init/index.ts @@ -10,7 +10,7 @@ import figlet from "figlet"; import chalk from "chalk"; export async function initProject(options?: InitOptions) { - const nextjsProjectExists = existsSync("package.json"); + const nextjsProjectExists = existsSync("next.config.mjs"); if (!nextjsProjectExists) { consola.fatal( "No Next.js project detected. Please create a Next.js project and then run `kirimase init` within that directory." From 10934a0cf91319a534faa104f0c2d075235a3fc2 Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <124715224+DhairyaMajmudar@users.noreply.github.com> Date: Sun, 9 Jun 2024 22:11:14 +0530 Subject: [PATCH 2/2] Update index.ts --- src/commands/init/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/init/index.ts b/src/commands/init/index.ts index 722e7396..6aad4a89 100644 --- a/src/commands/init/index.ts +++ b/src/commands/init/index.ts @@ -10,7 +10,7 @@ import figlet from "figlet"; import chalk from "chalk"; export async function initProject(options?: InitOptions) { - const nextjsProjectExists = existsSync("next.config.mjs"); + const nextjsProjectExists = existsSync("next.config.*"); if (!nextjsProjectExists) { consola.fatal( "No Next.js project detected. Please create a Next.js project and then run `kirimase init` within that directory."