Skip to content

Commit e7642ae

Browse files
committed
Adds .gitignore file to default template
1 parent 9c31d4f commit e7642ae

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

scripts/init.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ module.exports = function(hostPath, appName, verbose) {
3737
// Copy the files for the user
3838
fs.copySync(path.join(selfPath, 'template'), hostPath);
3939

40+
// Rename files
41+
[
42+
['gitignore', '.gitignore'],
43+
].forEach(function(nameMap) {
44+
fs.move(path.join(hostPath, nameMap[0]), path.join(hostPath, nameMap[1]), []);
45+
});
46+
4047
// Run another npm install for react and react-dom
4148
console.log('Installing react and react-dom from npm...');
4249
// TODO: having to do two npm installs is bad, can we avoid it?

template/gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# misc
7+
npm-debug.log

0 commit comments

Comments
 (0)