Vinz

Publish a NPM package

logo Մι∩z•thedev · Follow Published in Coding · 6 min read · 1 day ago __ 👏65k 💬321 🔖 ⤴️ __

Reference on NPMjs

using yarn on npm.js

Edit the .yarnrc file

registry: https://registry.npmjs.org/

check package before publish

npm publish --dry-run↵
npm publish --dry-run subdir↵

pix

publish package

# publish package to npmjs.com
npm publish↵

# publish private package
#To use private packages, you must have a [paid user or organization account](https://www.npmjs.com/pricing)
npm publish --access private↵

# package as .tar (https://docs.npmjs.com/cli/v8/commands/npm-pack)
npm pack↵

# published package information
# display **latest version** available on the registry
npm view packageName version↵

display package info

# display **all versions** available on the registry
npm view packageName versions↵
  
# get owner
npm owner ls packageName@version↵

# local packages
# display **local version**
npm list packageName↵

# display **all local packages**
npm list --depth=0 | awk '{print $2}'↵
npm list --depth=0 | awk '{print $2}' | grep @user/↵