diff --git a/scripts/init.js b/scripts/init.js index fce0a8c241c..be5d58b158f 100644 --- a/scripts/init.js +++ b/scripts/init.js @@ -37,6 +37,10 @@ module.exports = function(hostPath, appName, verbose) { // Copy the files for the user fs.copySync(path.join(selfPath, 'template'), hostPath); + // Rename gitignore after the fact to prevent npm from renaming it to .npmignore + // See: https://github.com/npm/npm/issues/1862 + fs.move(path.join(hostPath, 'gitignore'), path.join(hostPath, '.gitignore'), []); + // 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..f709354aaaa --- /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