npm-create-component
Version:
A powerful CLI tool to generate React component files with CSS templates. Supports both JSX and TSX formats. Simplifies component creation for modern React projects.
36 lines (23 loc) • 1.14 kB
Markdown
# npm-create-component 🚀
A CLI tool to quickly generate React component files with associated CSS, supporting both JSX and TSX formats.
[](https://www.npmjs.com/package/npm-create-component)
[](https://github.com/sanjayachari/npm-create-component/blob/main/LICENSE)
[](https://github.com/sanjayachari/npm-create-component/stargazers)
## 🌟 Features
- Simple CLI interface for adding React components.
- Supports both JSX and TSX file extensions.
- Automatically generates a CSS file alongside the component.
- Ensures that the directory structure exists before creating files.
- Modern ES6 syntax for components.
## 📦 Installation
To install the package globally, run:
```bash
npm install -g npm-create-component
You can use it directly with npx without installing globally:
npx c-c components/About.jsx
--- OR ---
npx create-component components/Home.jsx
--- OR ---
npx create-comp components/Home.tsx