@@ -12,8 +12,9 @@ import {
12
12
} from 'node:fs' ;
13
13
import { join , resolve } from 'node:path' ;
14
14
import { parseArgs } from 'node:util' ;
15
- import { isCancel , select , text , log } from '@clack/prompts' ;
15
+ import { isCancel , select , text , log } from '@clack/prompts' ;
16
16
import { kebabCase } from 'es-toolkit' ;
17
+ import { execSync } from 'node:child_process' ;
17
18
18
19
const engines = [ 'deno' , 'node' , 'bun' ] as const ;
19
20
type Engine = ( typeof engines ) [ number ] ;
@@ -91,7 +92,7 @@ async function ensureName(name?: string): Promise<string> {
91
92
async function ensureTargetDir ( name : string , target ?: string ) : Promise < string > {
92
93
if ( target ) return target ;
93
94
94
- const defaultName = kebabCase ( name ) ;
95
+ const defaultName = `./ ${ kebabCase ( name ) } ` ;
95
96
96
97
const response = await text ( {
97
98
message : 'Where should the template be copied?' ,
@@ -208,7 +209,7 @@ async function main() {
208
209
updateProjectName ( targetPath , name ) ;
209
210
210
211
if ( args . values . git ) {
211
- existsSync ( 'git init' ) ;
212
+ execSync ( 'git init' ) ;
212
213
}
213
214
214
215
log . success ( `✅ Template "${ engine } " copied to "${ targetPath } "` ) ;
0 commit comments