mirror of
https://github.com/bobwen-dev/react-templates
synced 2025-04-12 00:56:39 +02:00
docs
This commit is contained in:
parent
898edf585b
commit
9a9e06033e
54
docs/cli.md
Normal file
54
docs/cli.md
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
# Command line Interface
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
```shell
|
||||||
|
npm install git+ssh://git@github.com:wix/react-templates -g
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
```shell
|
||||||
|
rt [file.rt|dir]* [options]
|
||||||
|
```
|
||||||
|
|
||||||
|
Such as:
|
||||||
|
```shell
|
||||||
|
rt dir/file.rt
|
||||||
|
```
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
||||||
|
The command line utility has several options. You can view the options by running `eslint -h`.
|
||||||
|
```
|
||||||
|
Usage:
|
||||||
|
$ rt <filename>[,<filename>] [<args>]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help Show help.
|
||||||
|
-c, --color Use colors in output. - default: true
|
||||||
|
-m, --common Use Common JS output. - 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 (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.
|
||||||
|
|
||||||
|
### `-m`, `--common`
|
||||||
|
|
||||||
|
Use Common JS output.
|
||||||
|
|
||||||
|
### `-f`, `--format`
|
||||||
|
|
||||||
|
Use Common JS output.
|
23
docs/integrations.md
Normal file
23
docs/integrations.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Integrations
|
||||||
|
|
||||||
|
## Intellij / Webstorm
|
||||||
|
|
||||||
|
### Install intellij react templates plugin
|
||||||
|
1. From intellij/webstorm open preferences
|
||||||
|
2. Go to plugins
|
||||||
|
3. Press browse repositories
|
||||||
|
4. Press manage repositories
|
||||||
|
5. Add repository: http://intellij.wixpress.com/
|
||||||
|
6. Select react-templates from the repository.
|
||||||
|
7. Press ok and restart the IDEA.
|
||||||
|
8. Open preferences
|
||||||
|
9. Go to react-packages plugin
|
||||||
|
10. Enable the plugin.
|
||||||
|
11. Configure node
|
||||||
|
12. Configure react template executable
|
||||||
|
|
||||||
|
### enable es6
|
||||||
|
react templates uses es6 syntax for lambda expressions in event handlers, enable this in the IDE:
|
||||||
|
|
||||||
|
|
||||||
|

|
BIN
docs/intellij-es6.png
Normal file
BIN
docs/intellij-es6.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 90 KiB |
Loading…
x
Reference in New Issue
Block a user