- Consider also setting
"private": true
to prevent accidental publication. - There is a forgoten command option can format the package.json. Alternatively, use
npx format-package -w
npm publish
- npm version increment: https://docs.npmjs.com/cli/version
- npm user:
npm login
,npm whoami
- [npmjs.com]
cannot be republished until 24 hours have passed.
afterunpublish
action - [npmjs.com] To publish package like
@davidkhala/myPack
to public, usenpm publish --access public
- https://docs.npmjs.com/creating-and-publishing-scoped-public-packages#publishing-scoped-public-packages
npm install
- how to install private package in docker image: https://docs.npmjs.com/docker-and-private-modules
- [WARN] npm config global
--global
,--local
are deprecated. Usenpm i --location=global
instead.
- there is no automatic way to manage npm token explicitly
- try github package registry
- bump all dependencies to latest
npm outdated
will list out all latest versions of your dependenciesnpm update
will do the update
npm deprecate <package-name>@<version> "<deprecation message>"
- To undeprecate a package, replace "<deprecation message>" with "" (an empty string)
npm create
is an alias, fornpm init
- This was done using npm 6.10.1+.
npm create ${package-name}
is a shorthand for running:npx create-${package-name}