├── .babelrc ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── Gruntfile.js ├── LICENSE ├── README.md ├── bin └── rt.js ├── docs ├── cli.md ├── integrations.md ├── intellij-es6.png └── native.md ├── fiddle.html ├── home.config.js ├── img ├── github-fork-me.png ├── icons-footer-sab5af31545.png ├── logo-rt.svg └── samples │ └── delete.png ├── index.html ├── package.json ├── playground.config.js ├── playground ├── .eslintrc ├── CMLint.js ├── CodeMirrorEditor.js ├── CodeMirrorViewer.js ├── aceEditor.js ├── css │ ├── fiddle.css │ ├── home.css │ └── playground.css ├── dist │ ├── fiddle.min.js │ ├── home.min.js │ ├── rt-main.browser.js │ └── rt-main.browser.min.js ├── examples.js ├── examples.rt ├── examples.rt.js ├── fiddle-main.js ├── fiddle.js ├── fiddle.rt ├── fiddle.rt.js ├── home-main.js ├── libs │ ├── ace-builds-1.1.8 │ │ ├── src-min-noconflict │ │ │ ├── ace.js │ │ │ ├── mode-html.js │ │ │ ├── mode-javascript.js │ │ │ ├── mode-json.js │ │ │ └── theme-solarized_light.js │ │ └── src-min │ │ │ ├── ace.js │ │ │ ├── mode-html.js │ │ │ ├── mode-javascript.js │ │ │ └── mode-json.js │ ├── bootstrap │ │ ├── bootstrap.js │ │ └── bootstrap.min.js │ ├── codemirror-4.8 │ │ ├── addon │ │ │ ├── display │ │ │ │ └── panel.js │ │ │ ├── hint │ │ │ │ ├── css-hint.js │ │ │ │ ├── html-hint.js │ │ │ │ ├── javascript-hint.js │ │ │ │ ├── show-hint.css │ │ │ │ ├── show-hint.js │ │ │ │ └── xml-hint.js │ │ │ ├── lint │ │ │ │ └── lint.css │ │ │ └── runmode │ │ │ │ └── runmode.js │ │ ├── lib │ │ │ ├── codemirror.css │ │ │ └── codemirror.js │ │ ├── mode │ │ │ ├── css │ │ │ │ └── css.js │ │ │ ├── htmlmixed │ │ │ │ └── htmlmixed.js │ │ │ ├── javascript │ │ │ │ └── javascript.js │ │ │ └── xml │ │ │ │ └── xml.js │ │ └── theme │ │ │ └── solarized.css │ └── requirejs-plugins │ │ ├── json.js │ │ ├── json.min.js │ │ ├── text.js │ │ └── text.min.js ├── playground-fiddle.rt ├── playground-fiddle.rt.js ├── playground.js ├── playground.rt ├── playground.rt.js ├── rt-main.js └── samples │ ├── hello.code │ ├── hello.rt │ ├── rt-if.code │ ├── rt-if.rt │ ├── rt-import.rt │ ├── rt-props.code │ ├── rt-props.rt │ ├── rt-repeat.code │ ├── rt-repeat.rt │ ├── rt-require.rt │ ├── todo.code │ ├── todo.rt │ ├── todo2.code │ ├── todo2.rt │ ├── weather.code │ └── weather.rt ├── sample ├── .eslintrc ├── ImageSearch.js ├── ImageSearch.rt ├── ImageSearch.rt.js ├── InfiniteScroll.js ├── index.html ├── main.js └── sample.css ├── src ├── RTCodeError.js ├── api.js ├── cli.js ├── context.js ├── formatters │ ├── json.js │ └── stylish.js ├── fsUtil.js ├── options.js ├── reactDOMSupport.js ├── reactNativeSupport.js ├── reactPropTemplates.js ├── reactSupport.js ├── reactTemplates.js ├── rt-style-support-data.js ├── rtStyle.js ├── shell.js └── utils.js ├── test ├── data │ ├── autobind.rt │ ├── autobind.rt.js │ ├── className.rt │ ├── className.rt.html │ ├── comment.rt │ ├── comment.rt.amd.js │ ├── comment.rt.es6.js │ ├── concat.rt │ ├── concat.rt.html │ ├── custom-element.rt │ ├── custom-element.rt.html │ ├── div.rt │ ├── div.rt.15.js │ ├── div.rt.amd.js │ ├── div.rt.commonjs.js │ ├── div.rt.es6.js │ ├── div.rt.globals.js │ ├── div.rt.js │ ├── div.rt.typescript.ts │ ├── eval.rt │ ├── eval.rt.html │ ├── if-with-scope │ │ ├── valid-if-scope.rt │ │ └── valid-if-scope.rt.js │ ├── import.rt │ ├── import.rt.amd.js │ ├── import.rt.commonjs.js │ ├── import.rt.es6.js │ ├── import.rt.globals.js │ ├── import.rt.js │ ├── import.rt.typescript.ts │ ├── include.rt │ ├── include.rt.html │ ├── inputs.rt │ ├── inputs.rt.js │ ├── invalid │ │ ├── if-with-scope │ │ │ ├── invalid-if-scope-1.rt │ │ │ ├── invalid-if-scope-2.rt │ │ │ ├── invalid-if-scope-3.rt │ │ │ ├── invalid-if-scope-4.rt │ │ │ └── invalid-if-scope-5.rt │ │ ├── invalid-autobind.rt │ │ ├── invalid-brace.rt │ │ ├── invalid-exp.rt │ │ ├── invalid-html.rt │ │ ├── invalid-js.rt │ │ ├── invalid-lambda.rt │ │ ├── invalid-repeat-1.rt │ │ ├── invalid-repeat-2.rt │ │ ├── invalid-rt-import-1.rt │ │ ├── invalid-rt-import-2.rt │ │ ├── invalid-rt-import-3.rt │ │ ├── invalid-rt-import-4.rt │ │ ├── invalid-rt-require-1.rt │ │ ├── invalid-rt-require-2.rt │ │ ├── invalid-rt-require-duplicate.rt │ │ ├── invalid-rt-template-1.rt │ │ ├── invalid-rt-template-2.rt │ │ ├── invalid-scope.rt │ │ ├── invalid-single-root.rt │ │ ├── invalid-style-1.rt │ │ ├── invalid-style-2.rt │ │ ├── invalid-style-2.rt.js │ │ ├── invalid-virtual-1.rt │ │ └── invalid-virtual-2.rt │ ├── js-in-attr.rt │ ├── js-in-attr.rt.html │ ├── lambda.rt │ ├── lambda.rt.html │ ├── native │ │ ├── listViewAndCustomTemplate.rt │ │ ├── listViewAndCustomTemplate.rt.js │ │ ├── listViewAndCustomTemplate.rt.v029.js │ │ ├── listViewTemplate.rt │ │ ├── listViewTemplate.rt.js │ │ ├── listViewTemplate.rt.v029.js │ │ ├── nativeView.rt │ │ ├── nativeView.rt.js │ │ └── nativeView.rt.v029.js │ ├── non-breaking-space.rt │ ├── non-breaking-space.rt.js │ ├── propTemplates │ │ ├── implicitTemplate.rt │ │ ├── implicitTemplate.rt.js │ │ ├── siblingTemplates.rt │ │ ├── siblingTemplates.rt.js │ │ ├── simpleTemplate.rt │ │ ├── simpleTemplate.rt.js │ │ ├── templateInScope.rt │ │ ├── templateInScope.rt.js │ │ ├── twoTemplates.rt │ │ └── twoTemplates.rt.js │ ├── props-class.rt │ ├── props-class.rt.html │ ├── props.rt │ ├── props.rt.html │ ├── repeat-literal-collection.rt │ ├── repeat-literal-collection.rt.html │ ├── repeat-with-index.rt │ ├── repeat-with-index.rt.js │ ├── repeat.rt │ ├── repeat.rt.js │ ├── require.rt │ ├── require.rt.amd.js │ ├── require.rt.commonjs.js │ ├── require.rt.es6.js │ ├── require.rt.globals.js │ ├── require.rt.js │ ├── require.rt.typescript.ts │ ├── rt-class.rt │ ├── rt-class.rt.html │ ├── scope-evaluated-after-if.rt │ ├── scope-evaluated-after-if.rt.html │ ├── scope-evaluated-after-repeat.rt │ ├── scope-evaluated-after-repeat.rt.html │ ├── scope-evaluated-after-repeat2.rt │ ├── scope-evaluated-after-repeat2.rt.html │ ├── scope-obj.rt │ ├── scope-obj.rt.html │ ├── scope-reserved-tokens.rt │ ├── scope-reserved-tokens.rt.html │ ├── scope-trailing-semicolon.rt │ ├── scope-trailing-semicolon.rt.html │ ├── scope-variable-references.rt │ ├── scope-variable-references.rt.html │ ├── scope.rt │ ├── scope.rt.html │ ├── simple.js │ ├── simple.jsrt │ ├── stateless.rt │ ├── stateless.rt.js │ ├── style-vendor-prefix.rt │ ├── style-vendor-prefix.rt.js │ ├── style.rt │ ├── style.rt.html │ ├── svg.rt │ ├── svg.rt.html │ ├── test.rt │ ├── test.rt.js │ ├── virtual.rt │ ├── virtual.rt.html │ ├── virtual.rt.js │ ├── whitespace.rt │ └── whitespace.rt.js └── src │ ├── .eslintrc │ ├── fsUtil.unit.js │ ├── rt-html-valid.unit.js │ ├── rt.invalid.unit.js │ ├── rt.valid.unit.js │ ├── rtStyle.unit.js │ ├── shell.unit.js │ ├── utils.unit.js │ └── utils │ └── testUtils.js └── wallaby.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"], 3 | "ignore": "test/data" 4 | } 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # [*.{js,json}] 7 | [*] 8 | indent_style = space 9 | indent_size = 4 10 | end_of_line = lf 11 | charset = utf-8 12 | trim_trailing_whitespace = true # doesn't work yet 13 | insert_final_newline = true # doesn't work yet 14 | 15 | [{package.json,*.yml}] 16 | indent_style = space 17 | indent_size = 2 18 | 19 | [*.md] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/** 2 | bower_components/** 3 | **/*.rt.js 4 | **/*.json.js 5 | 6 | playground/**/*.rt.js 7 | playground/dist/** 8 | playground/libs/** 9 | 10 | playground2/** 11 | playground3/** 12 | playground3/dist/** 13 | playground3/libs/** 14 | playground3/**/*.rt.js 15 | playground4 16 | 17 | web/** 18 | 19 | playground/sample/** 20 | test/data/** 21 | dist-test 22 | dist 23 | 24 | internalTasks/release.js 25 | playground.config.js 26 | sample/InfiniteScroll.js 27 | /coverage 28 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["wix-editor", "wix-editor/node", "plugin:lodash/canonical"], 3 | "plugins": ["lodash", "wix-editor"], 4 | "rules": { 5 | "semi": [2, "never"], 6 | "func-style": [2, "declaration", {"allowArrowFunctions": true}], 7 | "prefer-spread": 1, 8 | "prefer-template": 1, 9 | "consistent-return": 0, 10 | 11 | "no-restricted-syntax": [2, "WithStatement", "ContinueStatement", "ForStatement"], 12 | "no-negated-condition": 1, 13 | 14 | 15 | "lodash/prefer-filter": 0, 16 | "lodash/chaining": [2, "always"], 17 | "lodash/prefer-map": 0, 18 | "lodash/path-style": 0, 19 | "lodash/no-extra-args": 2, 20 | "lodash/prefer-lodash-method": 0, 21 | 22 | "wix-editor/augmented-assignment": 1, 23 | "wix-editor/no-not-not": 1, 24 | "wix-editor/no-unneeded-match": 1, 25 | "wix-editor/prefer-filter": 1, 26 | "wix-editor/prefer-ternary": 1, 27 | "wix-editor/return-boolean": 1, 28 | "wix-editor/simplify-boolean-expression": 1 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | ### Operating systems ### 3 | .DS_Store 4 | .AppleDouble 5 | .LSOverride 6 | ._* 7 | .Spotlight-V100 8 | .Trashes 9 | 10 | ### Regular dev ### 11 | node_modules 12 | npm-debug.log 13 | .idea 14 | *.iml 15 | 16 | ### bower ### 17 | /bower_components/* 18 | 19 | ### babel ### 20 | /dist 21 | /dist-test 22 | 23 | /web 24 | /target 25 | /coverage 26 | /.nyc_output 27 | 28 | ### Test Output ### 29 | test/data/**/*.rt.actual.js 30 | test/data/**/*.code.js 31 | test/data/**/*.actual.html 32 | /package-lock.json 33 | /yarn.lock 34 | /yarn-error.log 35 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 6 4 | 5 | sudo: false 6 | 7 | #before_script: 8 | # - npm install -g grunt-cli 9 | 10 | install: 11 | - npm install 12 | 13 | script: 14 | - npm run lint 15 | - npm run test-cov 16 | 17 | branches: 18 | only: 19 | - master 20 | #after_success: 21 | # - npm run coveralls 22 | 23 | #after_success: 24 | # - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js 25 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to React-Templates 2 | 3 | Thanks for coming! Contributions of any kind are welcome. 4 | 5 | ## Setup 6 | 7 | * Fork [React-Templates](https://github.com/wix/react-templates) 8 | * Clone your fork 9 | * In your `react-templates` directory, run `npm i && grunt all` 10 | 11 | ## Submitting an issue 12 | 13 | You can submit an issue [here](https://github.com/wix/react-templates/issues). 14 | Please make sure that there isn't already an issue regarding the same matter, 15 | and include as many details as possible about the issue and on how to reproduce it, 16 | if relevant. 17 | 18 | ## Creating a pull request 19 | 20 | * Please adhere to the style and formatting of the code 21 | * Write tests for new functionality 22 | * Create purposeful and complete commits 23 | 24 | ### Before committing 25 | 26 | * Make sure that `grunt all` passes. 27 | * Pick a concise commit message 28 | 29 | When working on [wix.github.io/react-templates](http://wix.github.io/react-templates), 30 | run `grunt pgall` to create the minified files, 31 | but do not include their updated version in your commit. 32 | Describe in your PR what you did to the site and we'll update them after the merge. 33 | (This is important for preventing merge conflicts in the minified files). 34 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = function (grunt) { 3 | grunt.initConfig({ 4 | clean: { 5 | main: { 6 | src: ['coverage', 'playground/**/*.rt.js'] 7 | } 8 | }, 9 | eslint: { 10 | all: { 11 | src: [ 12 | 'src/**/*.js', 'playground/**/*.js', 13 | 'test/src/**/*.js', 14 | '!playground/libs/**/*.js', 15 | '!playground/dist/**/*.js', 16 | '!playground/**/*.rt.js' 17 | ] 18 | } 19 | }, 20 | jasmine_node: { 21 | options: { 22 | forceExit: true, 23 | match: '.', 24 | matchall: false, 25 | specNameMatcher: 'spec', 26 | extensions: 'js' 27 | }, 28 | all: ['server/test'], 29 | grunt: ['conf/tasks/test'] 30 | }, 31 | browserify: { 32 | rt: { 33 | files: { 34 | 'playground/dist/rt-main.browser.js': ['playground/rt-main.js'] 35 | }, 36 | options: { 37 | transform: ['brfs'], 38 | alias: ['react:react/addons'] 39 | } 40 | } 41 | }, 42 | tape: { 43 | options: { 44 | pretty: true, 45 | output: 'console' 46 | }, 47 | files: ['test/src/*.js'] 48 | }, 49 | watch: { 50 | rt: { 51 | files: [ 52 | 'playground/*.rt' 53 | ], 54 | tasks: ['rt'], 55 | options: { 56 | spawn: false 57 | } 58 | }, 59 | test: { 60 | files: [ 61 | 'src/**/*.*', 'test/**/*.*' 62 | ], 63 | tasks: ['test'], 64 | options: { 65 | spawn: false 66 | } 67 | } 68 | }, 69 | uglify: { 70 | my_target: { 71 | //options: { 72 | // sourceMap: true, 73 | // sourceMapIncludeSources: true, 74 | // sourceMapIn: 'example/coffeescript-sourcemap.js', // input sourcemap from a previous compilation 75 | //}, 76 | files: { 77 | 'playground/dist/rt-main.browser.min.js': ['playground/dist/rt-main.browser.js'], 78 | 'playground/libs/requirejs-plugins/text.min.js': ['playground/libs/requirejs-plugins/text.js'], 79 | 'playground/libs/requirejs-plugins/json.min.js': ['playground/libs/requirejs-plugins/json.js'] 80 | } 81 | } 82 | }, 83 | requirejs: { 84 | compile: { 85 | options: readConfig('./home.config.js') 86 | }, 87 | playground: { 88 | options: readConfig('./playground.config.js') 89 | } 90 | } 91 | }) 92 | 93 | function readConfig(file) { 94 | return eval(require('fs').readFileSync(file).toString()) // eslint-disable-line no-eval 95 | } 96 | 97 | grunt.loadNpmTasks('grunt-tape') 98 | grunt.loadNpmTasks('grunt-browserify') 99 | grunt.loadNpmTasks('grunt-contrib-watch') 100 | grunt.loadNpmTasks('grunt-contrib-requirejs') 101 | grunt.loadNpmTasks('grunt-eslint') 102 | grunt.loadNpmTasks('grunt-contrib-uglify') 103 | 104 | grunt.registerTask('default', ['eslint:all']) 105 | grunt.registerTask('lint', ['eslint:all']) 106 | grunt.registerTask('test', ['tape']) 107 | 108 | grunt.registerTask('rt', () => { 109 | const reactTemplates = require('./src/cli') 110 | const files = grunt.file.expand('playground/*.rt') 111 | const ret = reactTemplates.execute({modules: 'amd', force: true, _: files}) 112 | return ret === 0 113 | }) 114 | 115 | grunt.registerTask('build', ['rt', 'browserify:pg']) 116 | grunt.registerTask('home', ['rt', 'browserify:home']) 117 | grunt.registerTask('pgall', ['rt', 'browserify', 'uglify', 'requirejs']) 118 | 119 | grunt.registerTask('all', ['default', 'test']) 120 | } 121 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Wix.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /bin/rt.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict' 3 | const cli = require('../dist/cli') //src 4 | // console.log(process.argv); 5 | const exitCode = cli.execute(process.argv) 6 | /*eslint no-process-exit:0*/ 7 | process.exit(exitCode) 8 | -------------------------------------------------------------------------------- /docs/cli.md: -------------------------------------------------------------------------------- 1 | # Command line Interface 2 | 3 | ## Installation 4 | ```shell 5 | npm install react-templates -g 6 | ``` 7 | 8 | ## Usage 9 | ```shell 10 | rt [file.rt|glob]* [options] 11 | ``` 12 | 13 | Such as: 14 | ```shell 15 | rt dir/file.rt 16 | ``` 17 | 18 | Please note that when passing a glob as a parameter, it will be expanded by your shell. 19 | The results of the expansion can vary depending on your shell, and its configuration. 20 | If you want to use node glob syntax, you have to quote your parameter (using double quotes if you need it to run in Windows), as follows: 21 | 22 | 23 | ```shell 24 | rt 'src/**/*.rt' 25 | ``` 26 | 27 | ## Options 28 | 29 | The command line utility has several options. You can view the options by running `rt -h`. 30 | ``` 31 | Usage: 32 | $ rt [ ...] [] 33 | 34 | Options: 35 | -h, --help Show help. 36 | -c, --color Use colors in output. - default: true 37 | -m, --modules String Use output modules. (amd|commonjs|none|es6|typescript|jsrt) - either: amd, commonjs, none, es6, typescript, or jsrt 38 | -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 39 | -d, --dry-run Run compilation without creating an output file, used to check if the file is valid - default: false 40 | -r, --force Force creation of output. skip file check. - default: false 41 | -f, --format String Use a specific output format. (stylish|json) - default: stylish 42 | -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 43 | --list-target-version Show list of target versions - default: false 44 | -v, --version Outputs the version number. 45 | -k, --stack Show stack trace on errors. 46 | --react-import-path String Dependency path for importing React. 47 | --lodash-import-path String Dependency path for importing lodash. - default: lodash 48 | --native, --rn Renders react native templates. 49 | --flow Add /* @flow */ to the top of the generated file 50 | --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 51 | --normalize-html-whitespace Remove repeating whitespace from HTML text. - default: false 52 | ``` 53 | 54 | ### `-h`, `--help` 55 | 56 | This option outputs the help menu, displaying all of the available options. All other flags are ignored when this is present. 57 | 58 | ### `-c`, `--color` 59 | 60 | The option enable or disable color in the output. 61 | 62 | ### `-m`, `--modules` 63 | 64 | Use output modules. Valid targets are: `amd`, `commonjs`, `none`, `es6`, `typescript`, or `jsrt`. 65 | 66 | ### `-n`, `--name` 67 | 68 | When using globals, the name for the variable. The default is the [file name]RT, when using amd, the name of the module. 69 | 70 | ### `-d`, `--dry-run` 71 | 72 | Run compilation without creating an output file, used to check if the file is valid - default: false 73 | 74 | ### `-r`, `--force` 75 | 76 | This option allows to override the output file even if there are no changes. 77 | 78 | ### `-f`, `--format` 79 | 80 | Use a specific output format (`stylish` or `json`). 81 | 82 | ### `-t`, `--target-version` 83 | 84 | 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 85 | 86 | ### `--list-target-version` 87 | 88 | Show list of target versions. 89 | 90 | ### `-v`, `--version` 91 | 92 | Outputs the version number. 93 | 94 | ### `-k`, `--stack` 95 | 96 | Show stack trace on errors. 97 | 98 | ### `--react-import-path` 99 | 100 | Dependency path for importing React. 101 | 102 | ### `--lodash-import-path` 103 | 104 | Dependency path for importing lodash. 105 | 106 | ### `--native`, `--rn` 107 | 108 | Renders react native templates. 109 | 110 | ### `--native-target-version`, `--rnv` 111 | 112 | 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 113 | 114 | ### `--flow` 115 | 116 | Add /* @flow */ to the top of the generated file 117 | 118 | ### `--normalize-html-whitespace` 119 | 120 | Remove repeating whitespace from HTML text. 121 | 122 | Repeating whitespaces normally are not displayed and thus can be removed in order to reduce 123 | the size of the generated JavaScript file. 124 | 125 | Whitespace removal is not applied on `
` and `