Installing and publishing packages

How to install and publish packages

These steps assume you already have access to a workspace and have authenticated to your registry. If not, read Getting started to get up and running in less than a minute.

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 with npm. If you would like to publish a package to your Bytesafe registry, look at the example below.

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

Publish your npm packages with yarn. If you would like to publish a package to your Bytesafe registry, look at the example below.

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

Publish your npm packages with pnpm. If you would like to publish a package to your Bytesafe registry, look at the example below.

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