Package and Library Design
Prerequisites: Modules
Designing a package meant for other developers to install (rather
than an internal application) has different priorities: a small,
stable public interface, clear versioning (1.2.3 — breaking changes
bump the first number, semantic versioning), and a well-formed
package.json.
{
"name": "my-package",
"version": "1.0.0",
"main": "index.js",
"type": "module"
}
Once published (npm publish), anyone can npm install my-package —
the same mechanism used for every third-party package covered since
Level 1.