Skip to content

Commit

Permalink
Update npm.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lwindolf authored Nov 18, 2023
1 parent e4af6ca commit 11f400a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions cheat-sheet/Packaging/npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ related:
npm init # Create new package
npm login # Login to npmjs.com registry

# Scoped login to alternative registry
npm login --scope=@NAMESPACE --auth-type=legacy --registry=https://npm.pkg.github.com

npm publish
npm unpublish <package>

Expand All @@ -49,6 +46,17 @@ related:

npm start # Start an app

## Alternative registries

# Scoped login to alternative registry
npm login --scope=@NAMESPACE --auth-type=legacy --registry=https://npm.pkg.github.com

Set publish target in `package.json`

"publishConfig": {
"registry": "https://npm.pkg.github.com"
},

## Using npm modules for clients

E.g. exposing jquery with Express:
Expand Down

0 comments on commit 11f400a

Please sign in to comment.