Skip to content

Commit

Permalink
Adds .gitignore file to default template (#79)
Browse files Browse the repository at this point in the history
* Adds .gitignore file to default template

* Simplify renames

* Reference npm issue in comment

* Removing leading slash
  • Loading branch information
npverni authored and vjeux committed Jul 22, 2016
1 parent 1bffa4c commit e395498
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
7 changes: 7 additions & 0 deletions template/gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
node_modules

# misc
npm-debug.log

0 comments on commit e395498

Please sign in to comment.