Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add target option to npm readme #3636

Merged
merged 1 commit into from
Apr 9, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions npm-react-tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ By default JSX files with a `.js` extension are transformed. Use the `-x` option
--strip-types Strips out type annotations
--es6module Parses the file as a valid ES6 module
--non-strict-es6module Parses the file as an ES6 module, except disables implicit strict-mode (i.e. CommonJS modules et al are allowed)
--target <version> Target version of ECMAScript. Valid values are "es3" and "es5". Use "es3" for legacy browsers like IE8.

## API

Expand All @@ -45,6 +46,7 @@ option | values | default
`stripTypes` | `true`: strips out type annotations | `false`
`es6module` | `true`: parses the file as an ES6 module | `false`
`nonStrictEs6module` | `true`: parses the file as an ES6 module, except disables implicit strict-mode (i.e. CommonJS modules et al are allowed) | `false`
`target` | `"es3"`: ECMAScript 3<br>`"es5"`: ECMAScript 5| `"es5"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown files don't usually have
elements, do they? Usually markdown is intended to be both human and machine readable, to the extent possible, right? cc @zpao who will know best.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is allowed to have html elements. At least <iframe> is already used in the docs for inline videos. Here this is explained: Inline HTML.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but is it good style? Is it what we want to do here? My understanding (which is admittedly limited) is that we want to avoid HTML in the markdown files whenever possible. In the case of a linebreak, it seems avoidable, but maybe it's necessary/desirable here because we're in a table. Another option would be to use a coma or other form of punctuation. instead of a br. I don't have a strong preference here, mostly just flagging it for @zpao to take a look and make a call.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, that's allowed. Note, you can always view the rendered output on github, even in PRs.


```js
var reactTools = require('react-tools');
Expand Down