-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add gitignore and npmignore #58
Conversation
@brettz9 if you do Node/JavaScript development, I'd strongly recommend you put This package probably should exclude tests from distribution tarballs. Would you like to land that PR yourself, or should I go ahead and do it? |
Sorry, are you asking to just add I am behind the Great Firewall in China, and can't get around it atm, so not able to Google |
I do: echo >> ~/.gitconfig <<EOS
[core]
excludes_file = ~/.gitignore_global
EOS
echo node_modules >> ~/.gitignore_global |
I’m not familiar with user_modules; node_modules should be gitignored and i believe needn’t be npmignored since npm will always ignore it unless bundledDependencies are specified. |
|
@kemitchell : Re: global gitignore, while I understand the appeal, I think the advantage of a local one is consistency among project developers. Of the good many projects I've submitted PRs for, I've come across quite a few who have strong opinions about whether to include or exclude |
@brettz9 I don't think we need an mkdir tmp
cd tmp
npm i -D licensee
ls node_modules/licensee I hear you on |
Re: npmignore, yeah, sorry, I seem to have a mental block in forgetting to check Re: gitignore, assuming Git, which is of course not Node specific and has no mechanism for detecting the language, would agree to such a default, it could still cause problems with those using |
|
So where is your proposal to Git to allow |
I guess it is a reasonable practice and even if it causes me to forget adding it where explicit |
These files materialize after running `npm install`. Adding them to `.gitignore` to reduce friction for developers and to help ensure that they are not accidentally committed. I found this discussion from a few years ago that seems relevant: jslicense#58 (comment) While I agree with the sentiment of something so universal being a ignored by default globally, since it is not the default git behavior in practice it makes it more difficult for people to contribute to this repo. The cost of adding these lines to `.gitignore` is low, so this seems like a reasonable change to make.
These files materialize after running `npm install`. Adding them to `.gitignore` to reduce friction for developers and to help ensure that they are not accidentally committed. I found this discussion from a few years ago that seems relevant: jslicense#58 (comment) While I agree with the sentiment of something so universal being a ignored by default globally, since it is not the default git behavior in practice it makes it more difficult for people to contribute to this repo. The cost of adding these lines to `.gitignore` is low, so this seems like a reasonable change to make. I was surprised that this was not already the case, and since this seems to be a common issue in this repo, it seems that other developers are also surprised by this. - jslicense#23 - jslicense#26
These files materialize after running `npm install` and `npm run test`. Adding them to `.gitignore` to reduce friction for developers and to help ensure that they are not accidentally committed. I found this discussion from a few years ago that seems relevant: jslicense#58 (comment) While I agree with the sentiment of something so universal being a ignored by default globally, since it is not the default git behavior in practice it makes it more difficult for people to contribute to this repo. The cost of adding these lines to `.gitignore` is low, so this seems like a reasonable change to make. I was surprised that this was not already the case, and since this seems to be a common issue in this repo, it seems that other developers are also surprised by this. - jslicense#23 - jslicense#26
No description provided.