@@ -18,13 +18,17 @@ export async function createProject(options: ProjectConfig): Promise<string> {
1818
1919 try {
2020 await fs . ensureDir ( projectDir ) ;
21-
2221 const templateDir = path . join ( PKG_ROOT , "template/base" ) ;
2322 if ( ! ( await fs . pathExists ( templateDir ) ) ) {
2423 throw new Error ( `Template directory not found: ${ templateDir } ` ) ;
2524 }
2625 await fs . copy ( templateDir , projectDir ) ;
2726
27+ const gitignorePath = path . join ( projectDir , "_gitignore" ) ;
28+ if ( await fs . pathExists ( gitignorePath ) ) {
29+ await fs . move ( gitignorePath , path . join ( projectDir , ".gitignore" ) ) ;
30+ }
31+
2832 if ( options . auth ) {
2933 const authTemplateDir = path . join ( PKG_ROOT , "template/with-auth" ) ;
3034 if ( await fs . pathExists ( authTemplateDir ) ) {
@@ -40,7 +44,6 @@ export async function createProject(options: ProjectConfig): Promise<string> {
4044
4145 if ( await fs . pathExists ( ormTemplateDir ) ) {
4246 await fs . copy ( ormTemplateDir , projectDir , { overwrite : true } ) ;
43-
4447 const serverSrcPath = path . join ( projectDir , "packages/server/src" ) ;
4548 const baseLibPath = path . join ( serverSrcPath , "lib" ) ;
4649 const withAuthLibPath = path . join ( serverSrcPath , "with-auth-lib" ) ;
@@ -80,7 +83,6 @@ export async function createProject(options: ProjectConfig): Promise<string> {
8083 }
8184 } else {
8285 await fs . remove ( withAuthLibPath ) ;
83-
8486 if ( options . orm === "prisma" ) {
8587 const withAuthSchema = path . join (
8688 projectDir ,
@@ -108,7 +110,6 @@ export async function createProject(options: ProjectConfig): Promise<string> {
108110 options . orm ,
109111 options . turso ?? options . database === "sqlite" ,
110112 ) ;
111-
112113 await setupAuth ( projectDir , options . auth ) ;
113114 await setupEnvironmentVariables ( projectDir , options ) ;
114115
0 commit comments