@tailgrids/cli
v1.1.3
Published
CLI for adding Tailgrids components to React projects.
Downloads
689
Readme
Tailgrids CLI
The Tailgrids CLI is a command-line tool that helps you manage Tailgrids components in your React projects.
Commands
init
The init command initializes Tailgrids in your project.
npx @tailgrids/cli initThis will prompt you to:
- Select a theme for your components.
- Configure an import alias for your project.
The init command will create the following files:
tailgrids.config.json: Configuration file for the Tailgrids CLI.tailgrids.css: The base styles for Tailgrids components.- A
cnutility file for merging Tailwind CSS classes.
It will also install the required dependencies (clsx, @tailwindcss/forms, and tailwind-merge).
add
The add command adds Tailgrids components to your project. It copies the component files to your project's components/tailgrids/core directory and adds the required dependencies.
Usage
To add one or more components to your project, run the add command followed by the component IDs. You can find the component IDs in the Tailgrids documentation.
npx @tailgrids/cli add <component-id-1> <component-id-2> ...For example, to add the button and dialog components, run the following command:
npx @tailgrids/cli add button dialogThis will create the following files in your project:
components/
└── tailgrids/
├── button.tsx
└── dialog.tsxLicense
This project is licensed under the MIT License. See the LICENSE.md file for details.
