Create a new component forked from an existing one (copies source files and configs)
$bit fork <source-component-id> [target-component-name]
Copiedcopy

Arguments

ArgumentDescriptionRequired
source-component-idthe component id of the source component
target-component-namethe name for the new component (component name without scope, e.g. name/spaces/my-button). to set a different scope, use the '--scope' flag

Options

OptionOption AliasDescriptionValue Type
--scope-sdefault scope for the new componentstring
--path-prelative path in the workspace for the new component. by default the path is `<scope>/<namespace>/<name>`string
--refactor-rupdate the import/require statements in all dependent components (in the same workspace)boolean
--skip-dependency-installation-xdo not install packages of the imported componentsboolean
--env-eset the environment for the new componentstring
--skip-config-do not copy the config (aspects-config, env, etc) to the new component. helpful when it fails during aspect loadingboolean
--preserve-avoid refactoring file and variable/class names according to the new component nameboolean
--no-link-avoid saving a reference to the original componentboolean
--ast-EXPERIMENTAL. use ast to transform files instead of regexboolean