@purekit-ui/cli
v0.1.19
Published
The PureKit UI CLI is a command-line tool that helps you quickly scaffold new components for your project.
Maintainers
Readme
@purekit-ui/cli
The PureKit UI CLI is a command-line tool that helps you quickly scaffold new components for your project.
Installation
To use the CLI, you don't need to install it globally. You can run it directly using npx:
npx @purekit-ui/cli add <ComponentName>Usage
The primary command for the CLI is add, which allows you to generate a new component based on predefined templates.
Commands
The CLI provides the following commands:
add <ComponentName>
Scaffolds a single component by its name.
<ComponentName>: The name of the component to generate.
Example:
npx @purekit-ui/cli add Buttonadd --all
Scaffolds all available components into your project.
Example:
npx @purekit-ui/cli add --all--list
Displays an interactive list of all available components, allowing you to select one to generate.
Example:
npx @purekit-ui/cli --listThis will create a new component directory named Button inside src/components/purekit-ui. If your project doesn't have a src directory, it will be placed in components/purekit-ui.
Template Structure
The CLI generates components from a set of templates located in the packages/cli/src/templates directory. Each template includes:
- A component file (e.g.,
Component.jsx). - A
props.jsfile that defines the default props for the component.
These templates ensure that all generated components follow a consistent structure.
