Create a Workspace starter

A workspace starter is a template for Bit workspaces. It allows you to quickly set up a new workspace with pre-defined workspace configuration and (optionally) a few new or imported components.

Choose the 'standalone' option to create a workspace starter that uses a starter plugin and does not require an env to run. Choose the 'env-dependent' option to create a workspace starter that is registered by an env (and requires an env to run).

Env-dependent starter
Standalone starter

Run the following to create a new workspace starter:

$bit
Copiedcopy

The command should generate a component with the following structure:

my-starter
template
files
template/files/generateFiles.ts
generateFiles.ts
template/files/git-ignore.ts
git-ignore.ts
template/files/workspace-config.ts
workspace-config.ts
index.ts
index.ts
my-starter.docs.mdx
my-starter.docs.mdx
my-starter.ts
my-starter.ts

Using the starter

Env-dependent starters are run via the envs registering them. To use your starter, follow these steps:

  1. Create a new env or use an existing one.
  2. Set the env to use the starter.
  3. Export the env and the starter to a remote scope (to test a starter locally, see the next section.)
  4. In your terminal, run the command to create a new workspace using the env.

Testing the starter

To test a starter registered by an env that is available in the remote scope (the env and the starter have been exported) see run workspace starters.

To test a starter locally, while developing it set it up and run the following command with template name, the env that registers this template and the path to the workspace maintaining them:

$bit
Copiedcopy