reset-to-add
v1.0.3arrow_drop_downreset-to-add
An extension to clear local workspace and re-add the components.
Disclaimer
This extension is for internal use only.
This extension modify bit’s internal files and might corrupt your workspace, Don’t use it unless you are sure you know what you are doing.
This extension uses experimental APIs which might break without any notice.
Make sure to backup your workspace before using this.
About
This extension will do the following:
- Clear your bit objects
- Change the bitmap file so each component is without a version, without a scope and marked as not exported
It will actually reset your workspace to the state it was after you run bit init
and bit add
for all of your components. before the tag and export.
Installation
import the extension anywhere in your machine using
bit import bit.extensions/workspace/reset-to-add
Create a global bit.json file:
nano ~/Library/Caches/Bit/config/bit.json
Add the following to the bit.json:
{
"extensions": {
"bit.extensions/workspace/[email protected]": {
"options": {
"file": "path to the component index file"
}
}
}
}
Make sure to set the path to the extension file.
To make sure the install worked correctly, just run
bit --help
you should see in the bottom the following:
extensions commands
reset-to-add clear local workspace and re-add the components
Usage
This extension will add a new command bit reset-to-add
which doesn’t get any args.
All you need to do is run it on the desired workspace.
This extension must run on the workspace root level (where the .bitmap file exists).