Skip to content

Commit 7271420

Browse files
committed
feat: use first positional argument as dir when --dir is not specified
1 parent 5f3f84f commit 7271420

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ export async function create({
174174
alias: { h: 'help', d: 'dir', t: 'template' },
175175
});
176176

177+
// Set dir to first argument if not specified via `--dir`
178+
if (!argv.dir && argv._[0]) {
179+
argv.dir = argv._[0];
180+
}
181+
177182
console.log('');
178183
logger.greet(`◆ Create ${upperFirst(name)} Project`);
179184

0 commit comments

Comments
 (0)