From e7642ae009b363c081626fd8101b66f3361a1460 Mon Sep 17 00:00:00 2001 From: Nathan Verni Date: Fri, 22 Jul 2016 13:12:42 -0400 Subject: [PATCH] Adds .gitignore file to default template --- scripts/init.js | 7 +++++++ template/gitignore | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 template/gitignore diff --git a/scripts/init.js b/scripts/init.js index fce0a8c241..f4e7e4b80d 100644 --- a/scripts/init.js +++ b/scripts/init.js @@ -37,6 +37,13 @@ module.exports = function(hostPath, appName, verbose) { // Copy the files for the user fs.copySync(path.join(selfPath, 'template'), hostPath); + // Rename files + [ + ['gitignore', '.gitignore'], + ].forEach(function(nameMap) { + fs.move(path.join(hostPath, nameMap[0]), path.join(hostPath, nameMap[1]), []); + }); + // Run another npm install for react and react-dom console.log('Installing react and react-dom from npm...'); // TODO: having to do two npm installs is bad, can we avoid it? diff --git a/template/gitignore b/template/gitignore new file mode 100644 index 0000000000..ecd5384ab1 --- /dev/null +++ b/template/gitignore @@ -0,0 +1,7 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +/node_modules + +# misc +npm-debug.log