From ecdebcfbaa5880cc4851fa1707edac1d1b6c3529 Mon Sep 17 00:00:00 2001 From: nyqykk Date: Mon, 12 May 2025 18:53:10 +0800 Subject: [PATCH 1/2] feat: support no notes --- src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index e7e18e2..7018ae9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -302,7 +302,7 @@ export async function create({ } } - const nextSteps = noteInformation?.length + const nextSteps = noteInformation ? noteInformation : [ `1. ${color.cyan(`cd ${targetDir}`)}`, @@ -311,7 +311,8 @@ export async function create({ `4. ${color.cyan(`${pkgManager} run dev`)}`, ]; - note(nextSteps.map((step) => color.reset(step)).join('\n'), 'Next steps'); + nextSteps.length && + note(nextSteps.map((step) => color.reset(step)).join('\n'), 'Next steps'); outro('All set, happy coding!'); } From 3664b3a2a1c20018a8e56ef94098edac212d0650 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 12 May 2025 19:08:48 +0800 Subject: [PATCH 2/2] Update src/index.ts --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 7018ae9..d1d69ab 100644 --- a/src/index.ts +++ b/src/index.ts @@ -311,8 +311,9 @@ export async function create({ `4. ${color.cyan(`${pkgManager} run dev`)}`, ]; - nextSteps.length && + if (nextSteps.length) { note(nextSteps.map((step) => color.reset(step)).join('\n'), 'Next steps'); + } outro('All set, happy coding!'); }