Skip to content

Commit fb8ab2f

Browse files
authored
fix: .gitignore not generated (#7)
1 parent 562968c commit fb8ab2f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Diff for: cli.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ const createDirectoryContents = async (starterKitPath, newProjectPath) => {
3434
});
3535
};
3636

37-
const editJson = async projectName => {
37+
const editFiles = async projectName => {
3838
let file = editJsonFile(`${__dirname}/starter-kit/package.json`);
3939

4040
file.set('name', projectName);
41-
4241
file.save();
42+
43+
fs.rename(
44+
`${__dirname}/starter-kit/gitignore`,
45+
`${__dirname}/starter-kit/.gitignore`
46+
);
4347
};
4448

4549
const checkDirectory = async () => {
@@ -86,7 +90,7 @@ const run = async () => {
8690

8791
const starterKitPath = `${__dirname}/starter-kit/`;
8892

89-
await editJson(projectName);
93+
await editFiles(projectName);
9094

9195
await asyncMkdir(`${CURR_DIR}/${projectName}`);
9296

File renamed without changes.

0 commit comments

Comments
 (0)