From e718b33d72bf9322c41c83165a2ae2f5b11c3010 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Sun, 12 Aug 2018 14:07:22 -0500 Subject: [PATCH 1/4] templates' .gitignore -> dot.gitignore --- templates/boilerplate/{.gitignore => dot.gitignore} | 0 templates/demo/{.gitignore => dot.gitignore} | 0 templates/simple/{.gitignore => dot.gitignore} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename templates/boilerplate/{.gitignore => dot.gitignore} (100%) rename templates/demo/{.gitignore => dot.gitignore} (100%) rename templates/simple/{.gitignore => dot.gitignore} (100%) diff --git a/templates/boilerplate/.gitignore b/templates/boilerplate/dot.gitignore similarity index 100% rename from templates/boilerplate/.gitignore rename to templates/boilerplate/dot.gitignore diff --git a/templates/demo/.gitignore b/templates/demo/dot.gitignore similarity index 100% rename from templates/demo/.gitignore rename to templates/demo/dot.gitignore diff --git a/templates/simple/.gitignore b/templates/simple/dot.gitignore similarity index 100% rename from templates/simple/.gitignore rename to templates/simple/dot.gitignore From 690260a0fb1db067b6ef2902f656ae85c0b54b78 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Sun, 12 Aug 2018 14:08:16 -0500 Subject: [PATCH 2/4] remove unused negation in top-level .npmignore --- .npmignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.npmignore b/.npmignore index 6e77c3db..e69de29b 100644 --- a/.npmignore +++ b/.npmignore @@ -1 +0,0 @@ -!templates/**/.gitignore From 2c852a22c18d94ad9bb73371289b048e9b75d12b Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Sun, 12 Aug 2018 14:08:37 -0500 Subject: [PATCH 3/4] moveSync --- lib/core/fs.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/core/fs.js b/lib/core/fs.js index 6dbc1228..bd6c4be5 100644 --- a/lib/core/fs.js +++ b/lib/core/fs.js @@ -23,6 +23,10 @@ function move(){ return fs.move.apply(fs.move, arguments); } +function moveSync() { + return fs.moveSync.apply(fs.moveSync, arguments); +} + function appendFileSync() { return fs.appendFileSync.apply(fs.writeFileSync, arguments); } @@ -92,6 +96,7 @@ module.exports = { copy, copySync, move, + moveSync, readFile, readFileSync, appendFileSync, From a8f8acb7ffbdad450645ef11cf1ca6465e1eb2f3 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Sun, 12 Aug 2018 15:02:03 -0500 Subject: [PATCH 4/4] when installing template mv dot.gitignore -> .gitignore if it exists --- lib/cmds/template_generator.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cmds/template_generator.js b/lib/cmds/template_generator.js index 8597fcc0..aa672037 100644 --- a/lib/cmds/template_generator.js +++ b/lib/cmds/template_generator.js @@ -14,6 +14,9 @@ class TemplateGenerator { fs.copySync(templatePath, fspath); utils.cd(fspath); utils.sed('package.json', '%APP_NAME%', name); + if (fs.existsSync('dot.gitignore')) { + fs.moveSync('dot.gitignore', '.gitignore'); + } if (name === 'embark_demo') { console.log(__('Installing packages...').green);