@samitouri / QOS-React-2 / commits / 2de44cf668

Documents that JSX tool is transforming files with .js extension (and not .jsx) by default

Rick Beerendonk committed Jan 31, 2015 at 20:59 UTC 2de44cf66877957100e91d9d5797294736436b63
2 files changed +8 -2
docs/docs/09-tooling-integration.md
+5 -1
@@ -32,7 +32,11 @@ If you like using JSX, we provide an in-browser JSX transformer for development
32
33 ### Productionizing: Precompiled JSX
34
35 -If you have [npm](http://npmjs.org/), you can simply run `npm install -g react-tools` to install our command-line `jsx` tool. This tool will translate files that use JSX syntax to plain JavaScript files that can run directly in the browser. It will also watch directories for you and automatically transform files when they are changed; for example: `jsx --watch src/ build/`. Run `jsx --help` for more information on how to use this tool.
35 +If you have [npm](http://npmjs.org/), you can simply run `npm install -g react-tools` to install our command-line `jsx` tool. This tool will translate files that use JSX syntax to plain JavaScript files that can run directly in the browser. It will also watch directories for you and automatically transform files when they are changed; for example: `jsx --watch src/ build/`.
36 +
37 +By default JSX files with a `.js` extension are transformed. Use `jsx --extension jsx src/ build/` to transform files with a `.jsx` extension.
38 +
39 +Run `jsx --help` for more information on how to use this tool.
40
41
42 ### Helpful Open-Source Projects
npm-react-tools/README.md
+3 -1
@@ -6,6 +6,8 @@ This package compliments the usage of [React](http://facebook.github.io/react/).
6
7 This package installs a `jsx` executable that can be used to transform JSX into vanilla JS. This is often used as part of a build step. This transform is also exposed as an API.
8
9 +By default JSX files with a `.js` extension are transformed. Use the `-x` option to transform files with a `.jsx` extension.
10 +
11 ## Usage
12
13 ### Command Line
@@ -18,7 +20,7 @@ This package installs a `jsx` executable that can be used to transform JSX into
20 -V, --version output the version number
21 -c, --config [file] JSON configuration file (no file or - means STDIN)
22 -w, --watch Continually rebuild
21 - -x, --extension <js | coffee | ...> File extension to assume when resolving module identifiers
23 + -x, --extension <js | coffee | ...> File extension to assume when resolving module identifiers (default: js)
24 --relativize Rewrite all module identifiers to be relative
25 --follow-requires Scan modules for required dependencies
26 --cache-dir <directory> Alternate directory to use for disk cache