1 | ## Contributing
|
2 |
|
3 | ### Adding a new plugin to support (when approved in the next ECMAScript version)
|
4 |
|
5 | #### Update [`pluginFeatures.js`](/data/plugin-features.js)
|
6 |
|
7 | Example:
|
8 |
|
9 | In you were going to add `**` which is in ES2016:
|
10 |
|
11 | Find the relevant entries on [compat-table](kangax.github.io/compat-table/):
|
12 |
|
13 | `exponentiation (**) operator`
|
14 |
|
15 | Find the corresponding babel plugin:
|
16 |
|
17 | `transform-exponentiation-operator`
|
18 |
|
19 | Add add them in this structure:
|
20 |
|
21 | ```js
|
22 | // es2016
|
23 | "transform-exponentiation-operator": {
|
24 | features: [
|
25 | "exponentiation (**) operator",
|
26 | ],
|
27 | },
|
28 | ```
|
29 |
|
30 | #### Update [`plugins.json`](/data/plugins.json)
|
31 |
|
32 | Until `compat-table` is a standalone npm module for data we are using the git url
|
33 |
|
34 | `"compat-table": "github:kangax/compat-table#gh-pages",`
|
35 |
|
36 | So we update and then run `npm run build-data`. If there are no changes, then `plugins.json` will be the same.
|