Skip to content

Commit

Permalink
Updated CLI doc file
Browse files Browse the repository at this point in the history
  • Loading branch information
nippur72 committed Jul 8, 2016
1 parent 720db6c commit 6c7d032
Showing 1 changed file with 77 additions and 13 deletions.
90 changes: 77 additions & 13 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,26 @@ rt dir/file.rt
The command line utility has several options. You can view the options by running `rt -h`.
```
Usage:
$ rt <filename>[,<filename>] [<args>]
$ rt <filename> [<filename> ...] [<args>]
Options:
-h, --help Show help.
-c, --color Use colors in output. - default: true
-m, --modules String Use output modules. (amd|commonjs|es6|typescript|none) - default: none
-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 Show help.
-c, --color Use colors in output. - default: true
-m, --modules String Use output modules. (amd|commonjs|none|es6|typescript|jsrt) - either: amd, commonjs, none, es6, typescript, or jsrt
-n, --name String When using globals, the name for the variable. The default is the [file name]RT, when using amd, the name of the module
-d, --dry-run Run compilation without creating an output file, used to check if the file is valid - default: false
-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 (15.0.1, 15.0.0, 0.14.0, 0.13.1, 0.12.2, 0.12.1, 0.12.0, 0.11.2, 0.11.1, 0.11.0, 0.10.0, default)' - default: 0.14.0
--list-target-version Show list of target versions - default: false
-v, --version Outputs the version number.
-k, --stack Show stack trace on errors.
--react-import-path String Dependency path for importing React.
--lodash-import-path String Dependency path for importing lodash. - default: lodash
--native, --rn Renders react native templates.
--flow Add /* @flow */ to the top of the generated file
--native-target-version, --rnv String React native version to generate code for (0.9.0, 0.29.0, default) - either: 0.9.0, 0.29.0, or default - default: 0.9.0
--normalize-html-whitespace Remove repeating whitespace from HTML text. - default: false
```

### `-h`, `--help`
Expand All @@ -41,14 +50,69 @@ This option outputs the help menu, displaying all of the available options. All

The option enable or disable color in the output.

### `-m`, `--modules`

Use output modules. Valid targets are: `amd`, `commonjs`, `none`, `es6`, `typescript`, or `jsrt`.

### `-n`, `--name`

When using globals, the name for the variable. The default is the [file name]RT, when using amd, the name of the module.

### `-d`, `--dry-run`

Run compilation without creating an output file, used to check if the file is valid - default: false

### `-r`, `--force`

This option allows to override the output file even if there are no changes.

### `-m`, `--modules`
### `-f`, `--format`

Use output modules. (amd|commonjs|es6|typescript|none) - default: none
Use a specific output format (`stylish` or `json`).

### `-f`, `--format`
### `-t`, `--target-version`

React version to generate code for (15.0.1, 15.0.0, 0.14.0, 0.13.1, 0.12.2, 0.12.1, 0.12.0, 0.11.2, 0.11.1, 0.11.0, 0.10.0, default). default: 0.14.0

### `--list-target-version`

Show list of target versions.

### `-v`, `--version`

Outputs the version number.

### `-k`, `--stack`

Show stack trace on errors.

### `--react-import-path`

Dependency path for importing React.

### `--lodash-import-path`

Dependency path for importing lodash.

### `--native`, `--rn`

Renders react native templates.

### `--native-target-version`, `--rnv`

React native version to generate code for (0.9.0, 0.29.0, default) - either: 0.9.0, 0.29.0, or default - default: 0.9.0

### `--flow`

Add /* @flow */ to the top of the generated file

### `--normalize-html-whitespace`

Remove repeating whitespace from HTML text.

Repeating whitespaces normally are not displayed and thus can be removed in order to reduce
the size of the generated JavaScript file.

Whitespace removal is not applied on `<pre>` and `<textarea>` tags, or when the special attribute `rt-pre` is specified on a tag.

Use a specific output format.

0 comments on commit 6c7d032

Please sign in to comment.