From 6c7d032e15086a4b45aa137ec93ec4a1fa4027f1 Mon Sep 17 00:00:00 2001 From: Antonino Porcino Date: Fri, 8 Jul 2016 14:09:20 +0200 Subject: [PATCH] Updated CLI doc file --- docs/cli.md | 92 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 78 insertions(+), 14 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index a323b96..893d2ce 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -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 [,] [] +$ rt [ ...] [] 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` @@ -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` - -Use output modules. (amd|commonjs|es6|typescript|none) - default: none - ### `-f`, `--format` -Use a specific output format. +Use a specific output format (`stylish` or `json`). + +### `-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 `
` and `