A workspace is a group of files and directories that provide the necessary context for components to be composed and versioned.
A workspace can be used as a temporary, disposable tool for component maintenance, or as a long-term project that is collaborated on with the help of traditional VCS like git. Either way, components are independent and decoupled from a workspace once they are versioned and exported to their scopes.
Scopes and workspaces
A scope is a collaboration server for components. It is where components are exported to and imported from. A single workspace handles components of different scopes.
Create a scope for free on bit.cloud or host your own scope.
Start a new workspace using one of Bit's starters. For example, the following creates a workspace using the 'react' starter. It sets
my-org.tasks-workspace as the default scope for components in that workspace
(remote scopes hosted on bit.cloud are prefixed with the scope owner:
The output is similar to the following:
To preview your workspace components and inspect your workspace status using the UI, run the following:
The output displays the port for the UI server:
http://localhost:3000 in your browser. Right now your workspace is empty as no component is being tracked.
At any point during your component development, run the following to get a detailed status of your workspace:
Run the following to get a list of all your workspace components:
Explore the workspace directory structure below to learn how workspaces maintain components:
Workspace config files for the IDE
A workspace may also include configuration files for the various services used by the IDE.
For example, a
tsconfig.json file may be generated at the root of your workspace. This file does not determine the compilation config for components.
It is only used by your IDE, for a better dev experience.