diff --git a/scripts/init.js b/scripts/init.js index fce0a8c241c..f4e7e4b80dd 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 00000000000..ecd5384ab1e --- /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