-
Notifications
You must be signed in to change notification settings - Fork 4
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
Setup .npmignore file #19
Conversation
Exclude un-needed from npm package dist
NOTE: the patterns work with yarn, but break npm: but as this project uses yarn, all is fine. just a reminder for the future when switching to npm for some reason. |
Sorry for the delay. I think a better solution that yarn and npm support would be the files field in the package.json. If you want to make that change I'd merge that. |
FYI the |
Seems this went stale so I am closing it. If you do decide to pick this up at some later time and incorporate the suggestions we can revisit. |
Rather opposite, bundling src make ide confused, and added breakpoints to wrong files (files not used at runtime). you want to browse source, you should clone the repository. |
I am ok not shipping the source code in the build - but I think the way we want to do it is with an explicit files field in package.json that indicates the files we want. That is supported by yarn and npm (to my knowledge) |
I find separate file more maintainable. you can compare more easily with other projects or copy while file. also the .npmignore I submitted also only whitelists things (i.e first hides everything and then unhides) as for npm/yarn, yarn doesn't have publish functionality, it invokes npm internally. at least that's what I think is happening behind the scenes. in short, it works the same way in npm/yarn. but if you insist on package.json change, what is the section for that, root level "files" ? |
Yep. |
Created #20 |
Public-Facing Changes
None
Description
Exclude unneeded files from npm package dist.
Mainly
src
directory. It confused my IDE (PhpStorm), so I added debug to the wrong code without noticing the package had src folder also included, not just dist.This also decreases
node_modules
on installations. ftw!