-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds .gitignore file to default template #79
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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]), []); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is the empty array as third argument doing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was in issue with node_modules/fs-extra/lib/move/index.js:19
var shouldMkdirp = ('mkdirp' in options) ? options.mkdirp : true
^
TypeError: Cannot use 'in' operator to search for 'mkdirp' in undefined The third param is an empty array so that |
||
}); | ||
|
||
// 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? | ||
|
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not name it .gitignore but gitignore? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can't be named .gitignore due to npm/npm#1862, which is why we need to move it after the fact. |
||
|
||
# dependencies | ||
/node_modules | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you remove the leading |
||
|
||
# misc | ||
npm-debug.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't over abstract things. There's only one case right now so you can just write
which is going to be clearer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done