Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (38 sloc) 2.22 KB
id title permalink layout category prev next
Installing Components using Package Managers
Quick Start

Bit components can be installed with any package manager that implements the CommonJS package registry specification. Popular examples would be Yarn and NPM.

Once Bit components are organized in remote Scopes, they can be installed with any package manager client that implements the CommonJS package registry specification such as Yarn or NPM.

For example, you can check out our movie-app demo Scope and install any component from that Scope components using NPM or Yarn.

yarn add @bit/

Configuring Bit as a registry in NPM and Yarn clients

Bit can be configured as a registry with any CommonJS compatible client such as NPM and Yarn.

Configuring Bit as a scoped registry

Bit can be configured as a scoped registry and can be associated with any scope name.

npm config set '@bit:registry'

To install private components from, use npm login to associate Bit with an authenticated scope. Use your Bit credentials to login.

npm login --registry= --scope=@bit

To learn more about NPM scoped registries, please refer to NPM's documentation.

Configuring Bit as a proxy registry

For better user experience, Bit can be configured as a proxy registry in Yarn and NPM. Bit will proxy any request to the NPM official registry.

npm config set registry

Package naming convention

Package naming convention includes the Bit owner, Scope name, namespace and the component name.

An example for installing a component using Yarn or NPM would be as following:

yarn add <owner>.<scope>.<namespace>.<component-name>