-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Use files field in package.json instead of .npmignore #415
Conversation
I am not sure what to do with docs. |
also changelog is nice to have in the package |
and license |
and readme))) |
I never publish docs but some people do. So it‘s up to you ;-) Readme, changelog and License should be added automatically: https://docs.npmjs.com/files/package.json#files |
Are there any reasoning about what to include and what not to? I found it useful to be able to read quickly the docs right from node_modules. But maybe there is a general consensus to only include code? |
I don’t know about that. But thing like tests, linter configs, etc. shouldn’t bloat |
I’ve heard from someone that they read docs in |
Maybe, sometimes tests are saying more than docs … |
I totally agree regarding everything dev related, not sure about tests though… |
Ok so lets clarify what needs to be included for webpack 2, otherwise readme.md, license, changelog, flow-typed, dist, lib should be included I think. |
As I understand you need to use |
I’ve added |
Looks like I was wrong: you need to transpile as usual except ES6 modules: https://github.com/survivejs/webpack-book/blob/dev/manuscript/advanced_techniques/02_authoring_packages.md#what-files-to-publish-to-npm |
Yeah, sounds right. So we are actually done here, right? |
Ah no, module field… |
I think |
ok |
merged, thanks! |
Cool, could you do the same for other JSS projects? Or we can setup mrm for that ;-) |
Yes, exactly my plan, need to try mrm for that and lots of other things. Though maybe I will need a separate repository for that common stuff for "plugins", because they are a bit different than the core. |
Most probably. Have you seen webpack-defaults? |
nope, sounds like a good place to learn from, most probably would need to change a lot, but could use it as a starting point, right? |
Yeah, sure. It’s not integrated into any project yet. Let me know if you need any help ;-) |
That’s what you publish to npm now:
Most of this files aren‘t necessary. I’m not sure about flow files though.