mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
Enhance template with improved UI and gitignore handling
This commit is contained in:
@@ -24,9 +24,17 @@ export async function createProject(options: ProjectConfig): Promise<string> {
|
||||
}
|
||||
await fs.copy(templateDir, projectDir);
|
||||
|
||||
const gitignorePath = path.join(projectDir, "_gitignore");
|
||||
if (await fs.pathExists(gitignorePath)) {
|
||||
await fs.move(gitignorePath, path.join(projectDir, ".gitignore"));
|
||||
const gitignorePaths = [
|
||||
path.join(projectDir, "_gitignore"),
|
||||
path.join(projectDir, "packages/client/_gitignore"),
|
||||
path.join(projectDir, "packages/server/_gitignore"),
|
||||
];
|
||||
|
||||
for (const gitignorePath of gitignorePaths) {
|
||||
if (await fs.pathExists(gitignorePath)) {
|
||||
const targetPath = path.join(path.dirname(gitignorePath), ".gitignore");
|
||||
await fs.move(gitignorePath, targetPath);
|
||||
}
|
||||
}
|
||||
|
||||
if (options.auth) {
|
||||
|
||||
Reference in New Issue
Block a user