give templates a common dot.gitignore

if a template (built-in, downloaded or otherwise) doesn't supply its own
dot.gitignore file then templates/dot.gitignore will be used

also, update dot.gitignore to ignore chains.json by default
This commit is contained in:
Michael Bradley, Jr 2018-10-28 15:36:05 +01:00
parent dfd741ee8a
commit 7207108aaa
4 changed files with 3 additions and 16 deletions

View File

@ -107,10 +107,8 @@ class TemplateGenerator {
utils.sed('package.json', '%APP_NAME%', name);
if (fs.existsSync('dot.gitignore')) {
fs.moveSync('dot.gitignore', '.gitignore');
}
if (fs.existsSync('dot.gitignore')) {
fs.moveSync('dot.gitignore', '.gitignore');
} else if (!fs.existsSync('.gitignore')) {
fs.copySync(fs.embarkPath('templates/dot.gitignore'), '.gitignore');
}
if (installPackages) {

View File

@ -1,6 +0,0 @@
.embark
config/production/password
config/livenet/password
coverage
dist
node_modules

View File

@ -1,4 +1,5 @@
.embark
chains.json
config/production/password
config/livenet/password
coverage

View File

@ -1,6 +0,0 @@
.embark
config/production/password
config/livenet/password
coverage
dist
node_modules