Skip to content

Commit

Permalink
fix: move gitignore rename call (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
HaukeSchnau authored Jul 18, 2022
1 parent 5294902 commit 7111033
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/helpers/initGit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import path from "path";
import chalk from "chalk";
import fs from "fs-extra";
import ora from "ora";
import { execa } from "../utils/execAsync.js";
import { logger } from "../utils/logger.js";
Expand Down Expand Up @@ -32,9 +30,4 @@ export const initializeGit = async (projectDir: string) => {
)} could not initialize git. Update git to the latest version!\n`,
);
}

await fs.rename(
path.join(projectDir, "_gitignore"),
path.join(projectDir, ".gitignore"),
);
};
4 changes: 4 additions & 0 deletions src/helpers/scaffoldProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ export const scaffoldProject = async ({
spinner.start();

await fs.copy(srcDir, projectDir);
await fs.rename(
path.join(projectDir, "_gitignore"),
path.join(projectDir, ".gitignore"),
);

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

0 comments on commit 7111033

Please sign in to comment.