# react-general-cli

> react-general-cli CLI

Latest version **0.0.3** (published 2019-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-general-cli
pnpm add react-general-cli
yarn add react-general-cli
bun add react-general-cli
```

Provides the command `react-general-cli`.

## 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.0.3 |
| Published | 2019-08-19 |
| First published | 2019-08-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 25.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | andersm |

## Links

- npm: https://www.npmjs.com/package/react-general-cli
- npm.io page: https://npm.io/package/react-general-cli

## Dependencies (3)

- [gluegun](https://npm.io/package/gluegun.md) ^2.1.0
- [ts-node](https://npm.io/package/ts-node.md) ^7.0.1
- [typescript](https://npm.io/package/typescript.md) 3.2.2

## Recent versions

- 0.0.3 (latest) — 2019-08-19
- 0.0.2 — 2019-08-15
- 0.0.1 — 2019-08-15

## README

# react-general-cli

A React CLI to generate components.

You can create React Components easily, specifing what type of style you want to use, like Sass, CSS or Styled-Components and the extension of your component, line `.jsx`, `.tsx` or simply `.js` ;

## How to use

Install the package on your machine.

Using npm:

```
npm i -g react-general-cli
```

Using yarn:

```
yarn add global react-general-cli
```

## Usage

Currently there is only one command in the CLI that generates a React functional component on your `src / components` project folder. Let's see how to use:

```
react-general-cli rfc <component_name> [COMMANDS]
```

By default this command creates a folder with the component's name containing a `.js` component and a styled-component file with a predefined container like the structure below.

```
| -- components
    |-- <component_name>
        |--   index.js
        |--   style.js
```

## Available commands

| Command | Alias | Cool                                                                                                                                                                         |
| ------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| lang    | l     | Define the language extension you want to use in your component. Available extensions are `js`, `tsx` and `jsx`                                                              |
| style   | s     | Define the style type you want to use. Available types are `css`, `scss` and `styled`. `styled` creates a styled-component container and import him in the component header. |
| noStyle |       | Creates a component without style.                                                                                                                                           |

## Examples

Generates a default component
```
react-general-cli rfc Header
```

Generates a typescript component
```
react-general-cli rfc Footer --lang=tsx
```
or
```
react-general-cli rfc Footer -l=tsx
```

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