From 72714201066a933c38ca8df1f8824decb7cacacb Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 5 Nov 2025 10:53:23 +0800 Subject: [PATCH] feat: use first positional argument as dir when --dir is not specified --- src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.ts b/src/index.ts index 00745d9..953126b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -174,6 +174,11 @@ export async function create({ alias: { h: 'help', d: 'dir', t: 'template' }, }); + // Set dir to first argument if not specified via `--dir` + if (!argv.dir && argv._[0]) { + argv.dir = argv._[0]; + } + console.log(''); logger.greet(`◆ Create ${upperFirst(name)} Project`);