diff --git a/experimental/babel-preset-env/README.md b/experimental/babel-preset-env/README.md index 7b703dcf78..9a4ebf26d5 100644 --- a/experimental/babel-preset-env/README.md +++ b/experimental/babel-preset-env/README.md @@ -47,9 +47,9 @@ If you are targeting IE 8 and Chrome 55 it will include all plugins required by $ npm install --save-dev babel-preset-env ``` -## Usage via [`.babelrc`](http://babeljs.io/docs/usage/babelrc/) +## Usage -Default behavior without options runs all transforms (acts as [babel-preset-latest](https://babeljs.io/docs/plugins/preset-latest/)). +The default behavior without options runs all transforms (acts as [babel-preset-latest](https://babeljs.io/docs/plugins/preset-latest/)). ```js { @@ -59,7 +59,7 @@ Default behavior without options runs all transforms (acts as [babel-preset-late ### [Options](http://babeljs.io/docs/plugins/#pluginpresets-options) -#### `targets`: { [string]: number } +#### `targets`: `{ [string]: number }` Defaults to `{}`. @@ -70,38 +70,40 @@ Example environments: "chrome, edge, firefox, safari, ie, ios, node". The data for this is currently at: [/data/plugins.json](/data/plugins.json) and being generated by [/scripts/build-data.js](/scripts/build-data.js) using https://kangax.github.io/compat-table. -##### `node`: number | "current" | true +##### `node`: `number | "current" | true` If you want to compile against the current node version, you can specify `"node": true` or `"node": "current"` which would be the same as `node": parseFloat(process.versions.node)` -#### `browsers`: Array | string +#### `browsers`: `Array | string` > A query to select browsers (ex: last 2 versions, > 5%) using [browserslist](https://github.com/ai/browserslist). > Note, browsers' results are overridden by explicit items from `targets`. -#### `loose`: boolean +#### `loose`: `boolean` Defaults to `false`. Enable "loose" transformations for any plugins in this preset that allow them. -#### `modules`: "amd" | "umd" | "systemjs" | "commonjs" | true | false +#### `modules`: `"amd" | "umd" | "systemjs" | "commonjs" | false` Defaults to `"commonjs"`. Enable transformation of ES6 module syntax to another module type. Can be `false` to not transform modules. -#### `debug:` boolean +#### `debug:` `boolean` Defaults to `false` `console.log` out the targets and plugins being used as well as the version specified in `/data/plugins.json`. -#### `whitelist`: Array +#### `whitelist`: `Array` Defaults to `[]` Enable a whitelist of plugins to always include. -Useful if there is a bug in a native implementation, or a combination of a non-supported feature + a supported one doesn't work. (Ex: Node 4 supports native classes but not spread) +Useful if there is a bug in a native implementation, or a combination of a non-supported feature + a supported one doesn't work. + +Ex: Node 4 supports native classes but not spread. ### Examples