1 | # babel-preset-stage-3
|
2 |
|
3 | > Babel preset for stage 3 plugins.
|
4 |
|
5 | The gist of Stage 3 is:
|
6 |
|
7 | > **Stage 3**: candidate
|
8 | >
|
9 | > **What is it?** The proposal is mostly finished and now needs feedback from implementations and users to progress further.
|
10 |
|
11 | > **What’s required?** The spec text must be complete. Designated reviewers (appointed by TC39, not by the champion) and the ECMAScript spec editor must sign off on the spec text. There must be at least two spec-compliant implementations (which don’t have to be enabled by default).
|
12 | >
|
13 | > **What’s next?** Henceforth, changes should only be made in response to critical issues raised by the implementations and their use.
|
14 |
|
15 |
|
16 |
|
17 | ## Install
|
18 |
|
19 | ```sh
|
20 | npm install --save-dev babel-preset-stage-3
|
21 | ```
|
22 |
|
23 | ## Usage
|
24 |
|
25 | ### Via `.babelrc` (Recommended)
|
26 |
|
27 | **.babelrc**
|
28 |
|
29 | ```json
|
30 | {
|
31 | "presets": ["stage-3"]
|
32 | }
|
33 | ```
|
34 |
|
35 | ### Via CLI
|
36 |
|
37 | ```sh
|
38 | babel script.js --presets stage-3
|
39 | ```
|
40 |
|
41 | ### Via Node API
|
42 |
|
43 | ```javascript
|
44 | require("babel-core").transform("code", {
|
45 | presets: ["stage-3"]
|
46 | });
|
47 | ```
|
48 |
|
49 | ## References
|
50 |
|
51 | - Chapter "[The TC39 process for ECMAScript features](http://exploringjs.com/es2016-es2017/ch_tc39-process.html)" in "Exploring ES2016 and ES2017" by Axel Rauschmayer
|