Bit CLI documentation

In this document, we'll cover some of the most commonly used Bit CLI commands when working with the Unless Component Framework.

1. Installing packages

To install an npm package using Bit CLI, use the following command:

bit install [package]

This command will install the specified npm package for use in your workspace. For example, to install the @unless/component-library.display.display package, run:

bit install @unless/component-library.display.display

2. Creating a new component/element/layout/etc

To create a new component, element, layout, or any other custom module, it is usually easier to fork an existing example from our bit repository: https://bit.cloud/unless/component-library. If you want to create something totally new, you can use the following command:

bit create node path/to/comp

This command ensures that the new component is correctly registered with Bit. For instance, to create a new display component in the display/name directory, run:

bit create node display/name

After creating the component, you can start working on its implementation following the structure and guidelines provided in the framework documentation.

3. Tagging and exporting components

When you're ready to share your components with others or publish them to a remote scope, you'll need to tag and export them.

This command tags your components with a new version and adds a commit message describing the changes. For example:

bit tag -m "Initial implementation of MyComponent"

Once your components are tagged, you can export them to a remote scope with the following command:

bit export

This command publishes the tagged components to the specified remote scope. After exporting, your components will be available for others to use and import into their projects.

By utilising these Bit CLI commands, you can efficiently manage your components and collaborate with your team in a streamlined workflow.

๐Ÿ“˜

Complete Bit API documentation

To get detailed documentation on Bit CLI API, visit https://bit.dev


Whatโ€™s Next