-
Notifications
You must be signed in to change notification settings - Fork 5.3k
add .npmignore #1875
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 .npmignore #1875
Conversation
I think we'll want to think through whether to exclude some of these. No argument at all about |
The general idea makes sense to me, but I'm no npm package expert. @arschmitz @mgol Any opinions regarding this change? |
@fnagel This is a similar setup to what Core now uses. That said, I personally prefer declaring the |
Now that @arschmitz approved this: it would be great to include this in the next release! @mgol are you fine with the content of the file? I personally would prefer an extra file for this, like git does. @dmethvin You said "but some of the others might be useful to someone who isn't just taking the pre-built file". Which files do you have in mind here? |
@fnagel In my experience, using a list of files/directories to include as opposed of a list to exclude usually scales better. There is always a new IDE that will add its own directory that we wouldn't want to publish. On the other hand, we're using jquery-release here that always works with a fresh repo clone so it won't have this type of files/directories. So maybe there's no real risk here. The list looks good to me. I haven't checked if we can exclude more but the current list looks good to exclude. Core also doesn't include Grunftfile or linter config files, or tests in its published bundle, compare the files/directories at https://github.com/jquery/jquery with https://unpkg.com/browse/[email protected]/. |
@necccc One last thing before merging this: would you please change the commit message to "External: Add .npmignore file" or allow me to change your branch? Thanks! |
@necccc I changed the commit message and merged the PR. Thanks for your contribution! |
Hi 👋
I’ve been doing a little research for a conference talk on how npm package size relates to their content, and your package was one in the several ones that were flagged by my scripts. It has an outstanding weekly download count on npm and relatively large content that is not related directly to the package functionality.
I've added some files and folders to an .npmignore file, so they won't get packaged next time you release it on npm.
Thanks, and have a great day!