bugfix git ignore template
This commit is contained in:
parent
fd1ca886dc
commit
d6670a6fc4
2 changed files with 25 additions and 1 deletions
|
@ -105,6 +105,30 @@ module.exports.initGitRepo = async (opts) => {
|
|||
dest
|
||||
} = opts
|
||||
|
||||
const gitIgnorePath = path.join(dest, '.gitignore')
|
||||
fs.writeFileSync(gitIgnorePath, `
|
||||
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
node_modules
|
||||
|
||||
# builds
|
||||
build
|
||||
dist
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
`, 'utf8')
|
||||
|
||||
const cmd = `git init && git add . && git commit -m "init ${pkg.name}@${pkg.version}"`
|
||||
return execa.shell(cmd, { cwd: dest })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue