Manage capsules
$bit capsule
Additional Notes
a capsule is a directory containing the component code, isolated from the workspace.
normally, capsules are created during the build process, the component files are copied and the packages are installed
via the configured package-manager. the purpose is to compile/test them in isolation to make sure they will work for
other users after publishing/exporting them.
Options
Option | Option Alias | Description | Value Type |
---|---|---|---|
--json | -j | json format | boolean |
list
list the capsules generated for this workspace
$bit capsule list
Options
Option | Option Alias | Description | Value Type |
---|---|---|---|
--json | -j | json format | boolean |
create
create capsules for components
$bit capsule create [component-id...]
Options
Option | Option Alias | Description | Value Type |
---|---|---|---|
--base-dir | -b | set base dir of all capsules (hashed to create the base dir inside the root dir - host path by default) | string |
--root-base-dir | -r | set root base dir of all capsules (absolute path to use as root dir) | string |
--always-new | -a | create new environment for capsule | boolean |
--seeders-only | -s | create capsules for the seeders only (not for the entire graph) | boolean |
--id | -i | reuse capsule of certain name | string |
--use-hash | - | whether to use hash function (of base dir) as capsules root dir name | boolean |
--json | -j | json format | boolean |
--install-packages | -d | install packages by the package-manager | boolean |
--package-manager | -p | npm, yarn or pnpm, default to npm | string |
delete
delete capsules
$bit capsule delete
Options
Option | Option Alias | Description | Value Type |
---|---|---|---|
--scope-aspects | - | delete scope-aspects capsules | boolean |
--all | -a | delete all capsules for all workspaces and scopes | boolean |