Exporting components

Components are exported to remote scopes to make them available for other consumers and collaborators. A component is decoupled from its workspace and ready to be exported ('staged') when its latest changes are snapped.

Log in to bit.cloud

Before exporting components to bit.cloud, log in to your account:

$bit
Copiedcopy
See command synopsis

This step is necessary only the first time you export components to bit.cloud.

bit.cloud provides unlimited private or public scopes, for free. If you prefer to host your own scopes, see Hosting scopes.

Export all components

Check your workspace status to review which snaps are ready to be exported:

$bit
Copiedcopy

The output lists the staged components:

staged components

> apps/to-do versions: 0.0.1 ... ok

Run the following to export all staged components:

$bit
Copiedcopy
See command synopsis

The output summarizes the number of exported components and their target remote scopes:

1 components were exported to scope my-org.tasks-scope

Export a specific component

To export a specific component, specify the component name or id:

$bit
Copiedcopy

Export a group of components

To export a group of components, select the components using a glob pattern. For example, the following exports every staged component that is associated with the my-org.my-scope scope:

$bit
Copiedcopy

Export a component and stop maintaining it

If you don't intend to maintain the exported components, you have the option to eject them from your workspace. Ejected components will be used as regular packages, and will not be tracked by Bit.

Ejecting helps you keep your workspace clean and organized, it prevents you from accidentally modifying the exported components, and it improves your workspace performance.

$bit
Copiedcopy

Viewing exported components

Exported components are hosted on their target remote scopes. Each remote scope stores the component versions and features a web UI similar to the workspace UI, in which all components are showcased.
To see all exported components open your browser and navigate to the Bit scope URL.