From 11f400a66d90c67846aee05cc4a949756c8f9ff6 Mon Sep 17 00:00:00 2001 From: Lars Windolf Date: Sat, 18 Nov 2023 13:19:59 +0100 Subject: [PATCH] Update npm.md --- cheat-sheet/Packaging/npm.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cheat-sheet/Packaging/npm.md b/cheat-sheet/Packaging/npm.md index 9f7c0b16e..9e027d71a 100644 --- a/cheat-sheet/Packaging/npm.md +++ b/cheat-sheet/Packaging/npm.md @@ -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 @@ -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: