Exporting Components
Once you have created your remote scope and configured your defaultScope you can then export your components to the remote scope so they can be published and installed in other Bit workspaces or in other web projects.
Quick Guide#
For those that don't like reading docs feel free to follow the quick guide at the top of each page.
- Tag all components that have been modified
bit tag --all --message "first version"- Export your components
bit exportTagging Components#
Before exporting our components we need to tag them using the bit tag command. This will create a new version of your component.
You can tag each individual component
bit tag button --patch --message "first version"Or you can tag all components that have been modified
bit tag --all --message "first version"When component has finished tagging you should see the following message:
new components(first version for components) > ui/button@0.0.1➡️ Learn more about the Versioning Components.
tip
Use bit tag --help or bit tag -h to get a list of available options for this command.
Export Components#
Once you have tagged your component you can then run the bit export command.
bit exportWhen your component has finished exporting you should see the following message:
exported the following 1 component(s):your-username.demo-scope/ui/button➡️ Learn more about the Exporting Components.
See your Component in the Workspace#
In your workspace go to https://bit.dev/<user-name>/<scope-name> to see your exported components.
tip
Use bit export --help or bit export -h to get a list of available options for this command.
Committing the Bitmap#
Once the exporting process completes, the .bitmap file gets updated to reflect that new state. Make sure to track it with git.
git commit -am "updated .bitmap file after a successful export"What's Next?#
After exporting your component to the remote scope you can then install your component in another Bit workspace or in any other web project.