-
Notifications
You must be signed in to change notification settings - Fork 20.5k
npm ignore src directory #2161
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
npm ignore src directory #2161
Conversation
|
What about npm users who intend to use jQuery in an AMD environment? There is no CJS-format requirement for npm-published files. AMD can be converted to CJS using nodefy if you need it. The more common use case for jQuery by far is AMD since that's more popular on the client side. On the existence of |
They just use (For clarity let's leave exploration of |
|
This has been discussed at length. See e.g. #1526. We consider npm to be a JS package manager, not just Node.js/io.js package manager and the npm team agrees. Thus, we need to publish the The |
|
OK, I opened #2164 for the |
|
Hi @mzgol, thanks for clarifying and for opening #2164. Since jquery is so popular and widely used, just a few hundred KB of saved space has a big impact. On that note, returning to
But people doing a custom build or tinkering with jquery internals will generally want / need to checkout the entire repo anyway, and then use that repo as the npm module. I'm trying to think of a real life use case that is not naturally covered by |
|
TJ Vantoll wrote a good article on uses of amd modules in jQuery. http://developer.telerik.com/featured/jquery-using-only-what-you-need/ |
Sure, but:
Why? They don't have to reuse our build system, everything is declared in AMD modules so it's consumable by every AMD build system as well. Using a repository as an |
|
I see. It's the people who are consuming individual pieces of jquery in production (via AMD, at the moment) who would need to jump through a hoop. At this point in time the cross section of these people and npm users has got to be extremely small, but I do see the dilemma. Thanks. |
The src directory is full of AMD modules that are clearly not intended to be used in common js environments. Including it in the npm install doubles the size of the install from aproximately 1MB to 2MB. These files should be npm ignored and the world will have a little less waste.
(On this same token, the
dist/cdndirectory also appears to be unnecessary in the npm install, and again effectively doubles the npm module's footprint, but I probably best to take this one step at a time.)