fix headings [skip ci]
This commit is contained in:
parent
5739755a48
commit
54ce049760
@ -20,8 +20,8 @@
|
||||
- [How it Works](#how-it-works)
|
||||
- [Install](#install)
|
||||
- [Usage](#usage)
|
||||
- [Options](#options)
|
||||
- [Examples](#examples)
|
||||
- [Options](#options)
|
||||
- [Examples](#examples)
|
||||
- [Caveats](#caveats)
|
||||
|
||||
## How it Works
|
||||
@ -72,9 +72,9 @@ The default behavior without options runs all transforms (acts as [babel-preset-
|
||||
}
|
||||
```
|
||||
|
||||
### [Options](http://babeljs.io/docs/plugins/#pluginpresets-options)
|
||||
## [Options](http://babeljs.io/docs/plugins/#pluginpresets-options)
|
||||
|
||||
#### `targets`: `{ [string]: number }`
|
||||
### `targets`: `{ [string]: number }`
|
||||
|
||||
Defaults to `{}`.
|
||||
|
||||
@ -85,33 +85,33 @@ 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> | string`
|
||||
### `browsers`: `Array<string> | 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" | 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<string>`
|
||||
### `whitelist`: `Array<string>`
|
||||
|
||||
Defaults to `[]`
|
||||
Enable a whitelist of plugins to always include.
|
||||
@ -120,7 +120,7 @@ Useful if there is a bug in a native implementation, or a combination of a non-s
|
||||
|
||||
Ex: Node 4 supports native classes but not spread.
|
||||
|
||||
### Examples
|
||||
## Examples
|
||||
|
||||
```js
|
||||
// src
|
||||
@ -184,7 +184,7 @@ export var A = function A() {
|
||||
};
|
||||
```
|
||||
|
||||
#### Example with `node: true` or `node: "current"`
|
||||
### Example with `node: true` or `node: "current"`
|
||||
|
||||
```js
|
||||
// process.versions.node -> 6.9.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user