# react-juicy-cli

> Juicy CLI for React components generation

Latest version **0.9.3** (published 2021-05-12) · MIT license · 0 weekly downloads

## Install

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

Provides the command `react-juicy-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.9.3 |
| Published | 2021-05-12 |
| First published | 2021-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 218.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ohexus |
| Maintainers | ohexus |
| Keywords | React, CLI |

## Links

- npm: https://www.npmjs.com/package/react-juicy-cli
- Repository: https://github.com/ohexus/react-juicy-cli
- Issues: https://github.com/ohexus/react-juicy-cli/issues
- npm.io page: https://npm.io/package/react-juicy-cli

## Dependencies (8)

- [arg](https://npm.io/package/arg.md) ^5.0.0
- [clui](https://npm.io/package/clui.md) ^0.3.6
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [figlet](https://npm.io/package/figlet.md) ^1.5.0
- [inquirer](https://npm.io/package/inquirer.md) ^8.0.0
- [cli-table](https://npm.io/package/cli-table.md) ^0.3.6
- [configstore](https://npm.io/package/configstore.md) ^5.0.1
- [@types/cli-table](https://npm.io/package/@types/cli-table.md) ^0.3.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.9.3 (latest) — 2021-05-12
- 0.9.1 — 2021-05-11
- 0.9.0 — 2021-05-10
- 0.8.0 — 2021-05-06
- 0.7.2 — 2021-04-30
- 0.7.0 — 2021-04-29
- 0.6.1 — 2021-04-29
- 0.5.2 — 2021-04-28
- 0.5.1 — 2021-04-28
- 0.4.1 — 2021-04-26
- 0.3.0 — 2021-04-16
- 0.2.2 — 2021-04-16
- 0.2.1 — 2021-04-15
- 0.2.0 — 2021-04-15
- 0.1.0 — 2021-04-13
- … 31 more at https://npm.io/package/react-juicy-cli/versions

## README

# react-juicy-cli

This is a Node.js CLI for quickly generating React components!

## Install

npm:

```bash
$ npm install -g react-juicy-cli
```

yarn:

```bash
$ yarn global add react-juicy-cli
```

## Usage

### With questionnaire

Just run

```bash
$ react-juicy-cli
```

and you will get questions about what your component should be.

### With flags

You can provide flags to skip questionnaire and generate component in 1 line. Example:

```bash
$ react-juicy-cli --component TestComponent --typescript --scss --unit --enzyme --double-quotes --path path/to/directory
```

or

```bash
$ react-juicy-cli --cmp TestComponent --js --skip
```

## Available flags

Don't worry if you miss a few flag, the CLI will ask you a question from a questionnaire about missing information.\
The only thing you should know is that the generator uses single quotes and the current directory by default, you will only get the quotes and path questions if no flags are specified.\
If you use arguments and want to swap quotes, use the --single-quotes (--sq) or --double-quotes (--dq) flags.\
If you use arguments and want to change path, use the --path (-p) flag.

### Flags

| flag              | interface | description                                                                                              |
| ----------------- | --------- | -------------------------------------------------------------------------------------------------------- |
| --help            | Boolean   | display help for react-juicy-cli                                                                         |
| --version         | Boolean   | display current version                                                                                  |
| --path            | String    | relative path where to generate a Component/Context/Hook/Test (the current directory is used by default) |
| --component       | String    | specify component name and tell CLI to generate a component                                              |
| --context         | String    | specify context name and tell CLI to generate a context                                                  |
| --hook            | String    | specify hook name and tell CLI to generate a hook                                                        |
| --test            | String    | specify test name and tell CLI to generate a test                                                        |
| --test-component  | String    | specify test name and tell CLI to generate a test                                                        |
| --test-hook       | String    | specify test name and tell CLI to generate a test                                                        |
| --javascript      | Boolean   | generate JavaScript component                                                                            |
| --typescript      | Boolean   | generate TypeScript component                                                                            |
| --css             | Boolean   | generate CSS                                                                                             |
| --scss            | Boolean   | generate SCSS                                                                                            |
| --sass            | Boolean   | generate SASS                                                                                            |
| --less            | Boolean   | generate LESS                                                                                            |
| --enzyme          | Boolean   | use enzyme                                                                                               |
| --testing-library | Boolean   | use React Testing Library                                                                                |
| --unit            | Boolean   | generate .spec file according to the extension of your component (tsx or jsx)                            |
| --integration     | Boolean   | generate .test file according to the extension of your component (tsx or jsx)                            |
| --skip-styles     | Boolean   | skip styles step and generate component with tests                                                       |
| --skip-tests      | Boolean   | skip tests step and generate component with styles                                                       |
| --skip            | Boolean   | skip styles and tests and generate only component                                                        |
| --single-quotes   | Boolean   | tell generator that you prefer single quotes (default)                                                   |
| --double-quotes   | Boolean   | tell generator that you prefer double quotes                                                             |

### Aliases

| alias      | flag              |
| ---------- | ----------------- |
| -h         | --help            |
| -v         | --version         |
| -p         | --path            |
| --cmp      | --component       |
| --ctx      | --context         |
| --hk       | --hook            |
| --js       | --javascript      |
| --ts       | --typescript      |
| --enz      | --enzyme          |
| --test-lib | --testing-library |
| -u         | --unit            |
| -i         | --integration     |
| --skipS    | --skip-styles     |
| --skipT    | --skip-tests      |
| --t-cmp    | --test-component  |
| --t-hk     | --test-hook       |
| --sq       | --single-quotes   |
| --dq       | --double-quotes   |

### Alternatives

| flag              | alternatives                                  |
| ----------------- | --------------------------------------------- |
| --skip-styles     | --skip-style, --skipStyle, --skipStyles       |
| --skip-tests      | --skip-test, --skipTest, --skipTests          |
| --test-component  | --tCmp, --testCmp, --testComponent            |
| --test-hook       | --tHk, --testHk, --testHook                   |
| --testing-library | --testing-lib, --testingLib, --testingLibrary |

## Maintainers

- [Taras Moskalenko](https://github.com/ohexus)

## License

MIT.

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