-
-
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
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! |
done |
Looks reasonable to me. @vjeux What do you think? Do/should we do this in RN too? |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Testing this a bit more, the .gitignore file is ending up as .npmignore in the created project due to npm/npm#1862 |
This was something in my mental todo list. Happy with the concept (haven't reviewed the pull request yet) |
@ryanflorence did this in the react-project repo to handle this issue. |
Fix coming. |
905a696
to
5330a29
Compare
5330a29
to
e7642ae
Compare
Is there a specific advantage to programmatically creating the |
@@ -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'], |
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
fs.move(path.join(hostPath, 'gitignore'), path.join(hostPath, '.gitignore'));
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
@@ -37,6 +37,9 @@ module.exports = function(hostPath, appName, verbose) { | |||
// Copy the files for the user | |||
fs.copySync(path.join(selfPath, 'template'), hostPath); | |||
|
|||
// Rename files | |||
fs.move(path.join(hostPath, 'gitignore'), path.join(hostPath, '.gitignore'), []); |
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.
Would be good to link to npm issue here
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.
Good call 👍
Simplified the code and responded to questions. |
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules |
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.
Can you remove the leading /
, it looks like you're not putting it for npm-debug.log
Arg, okay so if you remove the / I'll merge it in, thanks! |
All set |
Thanks! |
Jest cache busting for ts/tsx files
Might be nice to give the users a .gitignore file to start with ala rails, ember, etc.