react-templates/docs/cli.md

55 lines
1.4 KiB
Markdown
Raw Normal View History

2014-12-10 09:02:54 +01:00
# Command line Interface
## Installation
```shell
2015-01-04 11:15:14 +01:00
npm install react-templates -g
2014-12-10 09:02:54 +01:00
```
## Usage
```shell
rt [file.rt|dir]* [options]
```
Such as:
```shell
rt dir/file.rt
```
## Options
2015-01-04 11:15:14 +01:00
The command line utility has several options. You can view the options by running `rt -h`.
2014-12-10 09:02:54 +01:00
```
Usage:
$ rt <filename>[,<filename>] [<args>]
Options:
-h, --help Show help.
-c, --color Use colors in output. - default: true
2015-02-19 13:45:41 +01:00
-m, --modules String Use output modules. (amd|commonjs|es6|none) - default: none
2014-12-10 09:02:54 +01:00
-r, --force Force creation of output. skip file check. - default: false
-f, --format String Use a specific output format. (stylish|json) - default: stylish
-t, --target-version String React version to generate code for (0.12.1, 0.12.0, 0.11.2, 0.11.1, 0.11.0, 0.10.0) - default: 0.12.1
-v, --version Outputs the version number.
-k, --stack Show stack trace on errors.
```
### `-h`, `--help`
This option outputs the help menu, displaying all of the available options. All other flags are ignored when this is present.
### `-c`, `--color`
The option enable or disable color in the output.
### `-r`, `--force`
This option allows to override the output file even if there are no changes.
2015-01-04 11:15:14 +01:00
### `-m`, `--modules`
2014-12-10 09:02:54 +01:00
2015-02-17 02:26:00 +01:00
Use output modules. (amd|commonjs|none|typescript) - default: none
2014-12-10 09:02:54 +01:00
### `-f`, `--format`
2015-01-04 11:15:14 +01:00
Use a specific output format.