Run set of tasks for build.
$bit build [component-pattern]
Additional Notes
by default, only new and modified components are built.
the build takes place in an isolated directories on the filesystem (called "capsules"). the component files are copied to these directories
and the package-manager installs the dependencies in the capsules root. once done, the build pipeline is running.
because this process can take a while on a large workspace, some flags are available to shorten the process. See the example section for more info.
Arguments
Argument | Description | Required |
---|---|---|
component-pattern | component name, component id, or component pattern. use component pattern to select multiple components. wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/**, !ui/button". use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'. use `bit pattern --help` to understand patterns better and `bit pattern <pattern>` to validate the pattern. |
Options
Option | Option Alias | Description | Value Type |
---|---|---|---|
--unmodified | -u | include unmodified components (by default, only new and modified components are built) | boolean |
--dev | -d | run the pipeline in dev mode | boolean |
--install | - | install core aspects in capsules | boolean |
--reuse-capsules | - | avoid deleting the capsules root-dir before starting the build | boolean |
--rewrite | - | use only with --reuse-capsules. rewrite the component files | boolean |
--reinstall | - | use only with --reuse-capsules. rerun the installation | boolean |
--tasks | - | build the specified task(s) only. for multiple tasks, separate by a comma and wrap with quotes. specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. teambit.compilation/compiler) | string |
--cache-packages-on-capsule-root | - | set the package-manager cache on the capsule root | boolean |
--list-tasks | - | list tasks of an env or a component-id for each one of the pipelines: build, tag and snap | string |
--skip-tests | - | skip running component tests during build process | boolean |
--fail-fast | - | stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed) | boolean |
--include-snap | - | EXPERIMENTAL. include snap pipeline tasks. Warning: this may deploy/publish if you have such tasks | boolean |
--include-tag | - | EXPERIMENTAL. include tag pipeline tasks. Warning: this may deploy/publish if you have such tasks | boolean |