# comp-gen-react

> CLI tool to generate React components with customizable templates and options

Latest version **0.1.0** (published 2023-08-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install comp-gen-react
pnpm add comp-gen-react
yarn add comp-gen-react
bun add comp-gen-react
```

Provides the command `comp-gen-react`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2023-08-11 |
| First published | 2023-05-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Paul Zoltán |
| Maintainers | paulzoltan |

## Links

- npm: https://www.npmjs.com/package/comp-gen-react
- Repository: https://github.com/paulzoltan/comp-gen-react
- Homepage: https://github.com/paulzoltan/comp-gen-react#readme
- Issues: https://github.com/paulzoltan/comp-gen-react/issues
- npm.io page: https://npm.io/package/comp-gen-react

## Dependencies (2)

- [commander](https://npm.io/package/commander.md) ^10.0.1
- [readline-sync](https://npm.io/package/readline-sync.md) ^1.4.10

## Recent versions

- 0.1.0 (latest) — 2023-08-11
- 0.0.2 — 2023-05-07
- 0.0.1 — 2023-05-07

## README

# Comp-Gen-React

Comp-Gen-React is a command-line tool for generating React components with optional TypeScript and CSS support. It allows you to quickly create a new React component with a single command.

## Installation

Comp-Gen-React can be installed globally via npm:

```
npm install -g comp-gen-react
```

## Usage

To use Comp-Gen-React, simply type `comp-gen-react` followed by the name of the component you want to create. You can use the following options to customize your component:

- `-t, --typescript`: Use TypeScript
- `-T, --no-typescript`: Don't use TypeScript
- `-c, --css`: Include CSS
- `-C, --no-css`: Omit CSS
- `-p, --preprocessor <type>`: CSS Preprocessor: css or scss
- `-P, --path <path>`: Path to create component

For example, to create a new component named `MyComponent` with TypeScript and CSS support, you can run:

```
comp-gen-react MyComponent -t -c
```

By default, components are created in the `src/components` directory. You can specify a different directory using the `-P, --path` option.

## Configuration

Comp-Gen-React uses a configuration file to store your preferred settings. If you run `comp-gen-react` without a configuration file, it will prompt you to answer a few questions to generate a default configuration file.

The configuration file is stored as a JSON file named `comp-gen-react.config.json`. You can modify this file manually to change your default settings.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

This project was inspired by [create-react-app](https://github.com/facebook/create-react-app).

---
_Source: https://npm.io/package/comp-gen-react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
