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

This commit is contained in:
Michael Bradley, Jr 2018-08-12 14:09:04 -05:00 committed by Iuri Matias
parent 53cd27b87d
commit f28c86666d
1 changed files with 3 additions and 0 deletions

View File

@ -50,6 +50,9 @@ class TemplateGenerator {
installTemplate(templatePath, name, installPackages) { installTemplate(templatePath, name, installPackages) {
utils.cd(templatePath); utils.cd(templatePath);
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 (fs.existsSync('dot.gitignore')) { if (fs.existsSync('dot.gitignore')) {
fs.moveSync('dot.gitignore', '.gitignore'); fs.moveSync('dot.gitignore', '.gitignore');