Skip to content

Commit

Permalink
fix: Models only
Browse files Browse the repository at this point in the history
  • Loading branch information
bcanfield committed Aug 21, 2023
1 parent d989fa2 commit fd10673
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/generators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,9 @@ export async function generate(
path.join(outputDirectory, "app")
);

fs.mkdirSync(path.join(outputDirectory, "prisma"));
if (!fs.existsSync(path.join(outputDirectory, "prisma"))) {
fs.mkdirSync(path.join(outputDirectory, "prisma"));
}

// Copy over the user's prisma schema and rename it to schema.prisma
copyAndRenameFile(
Expand Down Expand Up @@ -505,6 +507,14 @@ export async function generate(
},
]
);
} else {
await generateAppDirectoryFromModelTree(
modelTree,
directoryToOutputFiles,
enums,
maxAllowedDepth,
modelsOnly
);
}

return;
Expand Down

0 comments on commit fd10673

Please sign in to comment.