UNPKG

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
# npm-create-component 🚀 A CLI tool to quickly generate React component files with associated CSS, supporting both JSX and TSX formats. [![npm version](https://img.shields.io/npm/v/npm-create-component)](https://www.npmjs.com/package/npm-create-component) [![license](https://img.shields.io/npm/l/npm-create-component)](https://github.com/sanjayachari/npm-create-component/blob/main/LICENSE) [![GitHub stars](https://img.shields.io/github/stars/sanjayachari/npm-create-component)](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