diff --git a/.npmignore b/.npmignore index 6e77c3db..e69de29b 100644 --- a/.npmignore +++ b/.npmignore @@ -1 +0,0 @@ -!templates/**/.gitignore 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); 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, 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