Skip to content

Commit d415e88

Browse files
committed
fix: move gitignore rename call
1 parent 59f8ad4 commit d415e88

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/helpers/initGit.ts

-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import path from "path";
21
import chalk from "chalk";
3-
import fs from "fs-extra";
42
import ora from "ora";
53
import { execa } from "../utils/execAsync.js";
64
import { logger } from "../utils/logger.js";
@@ -32,9 +30,4 @@ export const initializeGit = async (projectDir: string) => {
3230
)} could not initialize git. Update git to the latest version!\n`,
3331
);
3432
}
35-
36-
await fs.rename(
37-
path.join(projectDir, "_gitignore"),
38-
path.join(projectDir, ".gitignore"),
39-
);
4033
};

src/helpers/scaffoldProject.ts

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ export const scaffoldProject = async ({
5757
spinner.start();
5858

5959
await fs.copy(srcDir, projectDir);
60+
await fs.rename(
61+
path.join(projectDir, "_gitignore"),
62+
path.join(projectDir, ".gitignore"),
63+
);
6064

6165
if (!noInstall) {
6266
await execa(`${pkgManager} install`, { cwd: projectDir });

0 commit comments

Comments
 (0)