when installing template mv dot.gitignore -> .gitignore if it exists

This commit is contained in:
Michael Bradley, Jr 2018-08-12 15:02:03 -05:00
parent 2c852a22c1
commit a8f8acb7ff

View File

@ -14,6 +14,9 @@ class TemplateGenerator {
fs.copySync(templatePath, fspath); fs.copySync(templatePath, fspath);
utils.cd(fspath); utils.cd(fspath);
utils.sed('package.json', '%APP_NAME%', name); utils.sed('package.json', '%APP_NAME%', name);
if (fs.existsSync('dot.gitignore')) {
fs.moveSync('dot.gitignore', '.gitignore');
}
if (name === 'embark_demo') { if (name === 'embark_demo') {
console.log(__('Installing packages...').green); console.log(__('Installing packages...').green);