Photo by Erol Ahmed on Unsplash
When developing an npm package, you have to confirm that it can actually be used. It's great if tests pass, exampl...
For further actions, you may consider blocking this person and/or reporting abuse
Nice article.
Just to add my 2 cents:
If you're building a complex package, you could want to split part of it into multiple sub-packages. It's (IMO) a clean programming structure that every logic has it's own file and require only what's necessary.
But doing dozen of
npm link
is maddening. And Lerna is such a great help with that.It allow you to easily manage sub-packages from adding dependencies, running scripts or publishing.
Super useful, thanks for the post Carl!
Very helpful!
npm pack
was new to me and just what I needed to verify changes to the files-field didn't break anything. Thanks!Did not know about npm pack. That's awesome! Thank you!
This just solved the problem I have been battling in ages, and I can finally go to sleep now 😅
Thanks for the amazing article!
Why not use testpack-cli? It automates the process of running your unit tests against the package produced by
npm pack
.