Rename component. if exported, create a new component and delete the original component. otherwise just renames current component
$bit rename <current-name> <new-name>
Arguments
| Argument | Description | Required | 
|---|---|---|
| current-name | the current component name (without its scope name) | ✅ | 
| new-name | the new component name (without its scope name. use --scope to define the new component's scope) | ✅ | 
Options
| Option | Option Alias | Description | Value Type | 
|---|---|---|---|
| --scope | -s | define the scope for the new component | string | 
| --refactor | -r | update the import/require statements in all dependent components (in the same workspace) | boolean | 
| --preserve | - | avoid renaming files and variables/classes according to the new component name | boolean | 
| --ast | - | EXPERIMENTAL. use ast to transform files instead of regex | boolean | 
| --delete | - | DEPRECATED. this is now the default | boolean | 
| --deprecate | - | instead of deleting the original component, deprecating it | boolean | 
| --path | -p | relative path in the workspace to place new component in. by default, the directory of the new component is from your workspace's "defaultScope" value | string |