Skip to content

Commit 842a191

Browse files
Raymond Fengraymondfeng
authored andcommitted
fix: Fix CLI to include .gitignore in the templates
1 parent 2c60b1e commit 842a191

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/cli/lib/project-generator.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,14 @@ module.exports = class extends Generator {
168168
{globOptions: {dot: true}}
169169
);
170170

171+
// Rename `_.gitignore` back to `.gitignore`.
172+
// Please note `.gitignore` will be renamed to `.npmignore` during publish
173+
// if it's there in the templates.
174+
this.fs.move(
175+
this.destinationPath('_.gitignore'),
176+
this.destinationPath('.gitignore')
177+
);
178+
171179
// Copy project type specific files from ./templates
172180
this.fs.copyTpl(
173181
this.templatePath('**/*'),

0 commit comments

Comments
 (0)