remove
The blocklet remove command is used to remove a component dependency from the current blocklet project. It modifies the blocklet.yml file by removing the specified component from the components array.
This command is the inverse of blocklet add. For a more comprehensive guide on managing dependencies, see Compose Components.
Usage#
To remove a component, run the command from within your blocklet's root directory.
blocklet remove <component-name>Arguments#
The command takes one required argument:
Argument | Description |
|---|---|
| Required. The name of the component to remove. This name must exactly match an entry in the |
How It Works#
The remove command follows a simple workflow to ensure the component is safely removed from your project's metadata.
Example#
Imagine your blocklet.yml file lists two components that your blocklet depends on:
name: my-app
version: 1.0.0
# ... other metadata
components:
- name: my-chart-component
did: "zd......"
- name: my-auth-component
did: "zd......"You decide you no longer need my-chart-component.
Command#
Run the following command in your terminal:
blocklet remove my-chart-componentResult#
The CLI will display a success message:
Component my-chart-component was successfully removedAfter the command executes, your blocklet.yml file is automatically updated:
name: my-app
version: 1.0.0
# ... other metadata
components:
- name: my-auth-component
did: "zd......"The my-chart-component entry has been removed from the components list.
Now that you know how to remove components, you may want to learn how to add them back or explore other commands for managing your blocklet. See blocklet add for adding dependencies or browse the full list of blocklet commands.