diff --git a/.gitignore b/.gitignore index 714ce619..46833c14 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ npm-debug.log ### Test Output ### test/data/**/*.rt.actual.js test/data/**/*.code.js +test/data/**/*.actual.html + diff --git a/docs/cli.md b/docs/cli.md index 893d2ce4..27f38db7 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -40,6 +40,8 @@ Options: --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 + --create-element-alias Use an alias name for "React.createElement()" + --external-helpers Emit helper functions as external dependency (and do not rely on 'lodash'). ``` ### `-h`, `--help` @@ -54,7 +56,7 @@ The option enable or disable color in the output. Use output modules. Valid targets are: `amd`, `commonjs`, `none`, `es6`, `typescript`, or `jsrt`. -### `-n`, `--name` +### `-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. @@ -70,7 +72,7 @@ This option allows to override the output file even if there are no changes. Use a specific output format (`stylish` or `json`). -### `-t`, `--target-version` +### `-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 @@ -92,13 +94,13 @@ Dependency path for importing React. ### `--lodash-import-path` -Dependency path for importing lodash. +Dependency path for importing lodash. ### `--native`, `--rn` Renders react native templates. -### `--native-target-version`, `--rnv` +### `--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 @@ -106,13 +108,72 @@ React native version to generate code for (0.9.0, 0.29.0, default) - either: 0.9 Add /* @flow */ to the top of the generated file -### `--normalize-html-whitespace` +### `--normalize-html-whitespace` -Remove repeating whitespace from HTML text. +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 `