1
0
Fork 0

bugfix git ignore template

This commit is contained in:
Travis Fischer 2018-03-04 19:44:19 -05:00 committed by Joost De Cock
parent fd1ca886dc
commit d6670a6fc4
2 changed files with 25 additions and 1 deletions

View file

@ -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 })
}