Installing and publishing packages

How to install and publish packages

These steps assume you already have access to a Bytesafe workspace and have authenticated to a registry. If not, read Getting started.

Installing packages from your private registry

To install npm packages using npm, see the example below.

npm --registry 'https://example.bytesafe.dev/r/default/' install <package>

The installed package dependencies are now stored and available in Bytesafe.

To add npm packages using yarn, see the example below.

yarn --registry 'https://example.bytesafe.dev/r/default/' add <package>

The added package dependencies are now stored and available in Bytesafe.

To add npm packages using pnpm, see the example below.

pnpm add <package> --registry 'https://example.bytesafe.dev/r/default/' 

The added package dependencies are now stored and available in Bytesafe.

Publishing packages to your registry

Publish your npm packages to your Bytesafe registry with npm.

npm --registry 'https://example.bytesafe.dev/r/default/' publish <package>

Publish your npm packages to your Bytesafe registry with yarn.

yarn --registry 'https://example.bytesafe.dev/r/default/' publish <package>

Publish your npm packages to your Bytesafe registry with pnpm.

pnpm publish <package> --registry 'https://example.bytesafe.dev/r/default/'