@@ -3,7 +3,7 @@ import fs from 'node:fs/promises'
33import type { ProjectOptions } from '@/commands/init/types'
44
55const versionMap = new Map < string , string > ( [
6- [ 'node' , '22 .0.0' ] ,
6+ [ 'node' , '24 .0.0' ] ,
77 [ 'npm' , '11.6.0' ] ,
88 [ 'yarn' , '1.22.22' ] ,
99 [ 'pnpm' , '10.20.0' ] ,
@@ -16,25 +16,21 @@ export async function addBase(opts: ProjectOptions): Promise<void> {
1616
1717 await Promise . all ( [
1818 fs . copyFile ( new URL ( '_gitignore' , templatePath ) , '.gitignore' ) ,
19- fs . copyFile ( new URL ( 'tsconfig.json' , templatePath ) , 'tsconfig.json' ) ,
2019 fs . copyFile ( new URL ( 'turbo.json' , templatePath ) , 'turbo.json' ) ,
2120 fs . cp ( new URL ( 'tools' , templatePath ) , 'tools' , copyOptions ) ,
2221 fs . mkdir ( 'apps' , { recursive : true } ) ,
23- fs . mkdir ( 'packages' , { recursive : true } ) ,
24- fs . writeFile ( '.env.example' , '# Example environment variables\n' ) ,
25- fs . writeFile ( '.nvmrc' , `v${ versionMap . get ( 'node' ) } ` ) ,
26- ] )
27-
28- await setupPackageManager ( opts , templatePath )
29-
30- await Promise . all ( [
22+ fs . cp ( new URL ( 'packages/lib' , templatePath ) , 'packages/lib' , copyOptions ) ,
3123 fs . cp ( new URL ( 'packages/ui' , templatePath ) , 'packages/ui' , copyOptions ) ,
3224 fs . cp (
3325 new URL ( 'packages/validators' , templatePath ) ,
3426 'packages/validators' ,
3527 copyOptions ,
3628 ) ,
29+ fs . writeFile ( '.env.example' , '# Example environment variables\n' ) ,
30+ fs . writeFile ( '.nvmrc' , `v${ versionMap . get ( 'node' ) } ` ) ,
3731 ] )
32+
33+ await setupPackageManager ( opts , templatePath )
3834}
3935
4036async function setupPackageManager ( opts : ProjectOptions , templatePath : URL ) {
0 commit comments