# `react-cli`

React CLI, inspired by Angular CLI

- [Feature Requests](#feature-requests)
- [Motivation](#motivation)
- [API](#api)
  - [`react generate component`](#-react-generate-component)
    - [Flags](#flags)
    - [Syntax](#syntax)
    - [Example](#example)
  - [`react generate service`](#-react-generate-service)
    - [Flags](#flags-1)
    - [Syntax](#syntax-1)
    - [Example](#example-1)
  - [`react config init`](#-react-config-init)
    - [Flags](#flags-2)
    - [Syntax](#syntax-2)
    - [Example](#example-2)

<small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small>

# Feature Requests

If you have any requests you'd like, or want or need guidance, please open an issue.

# Motivation

React doesn't have a CLI. I think angular did a good job with their CLI.
However, if you don't want to use Angular, You're out of luck.
This is a solution for tools that I use.

# API

## `react generate component`

Generates a component. If `src` folder exists, it will be place in there.

### Flags

- -f = Generates a function component
- -c = Generates a class component

### Syntax

```shell
react generate component [path/to/YourComponent] [-f | -c]
```

### Example

```shell
react generate component path/to/My-Component -f
# or
react g c path/to/My-Component -f

```

## `react generate service`

### Flags

No flags available.

### Syntax

```shell
react generate service [path/to/YourComponent]
```

### Example

```shell
react generate service path/to/YourComponent
# or
react g s path/to/YourComponent
```

## `react config init`

Initializes a configuration file. If no file is created, the default configuration is used.

### Flags

No flags available.

### Syntax

```shell
react config init
```

### Example

```shell
react config init
# or
react c i
```