1 | Babel Preset
|
2 | ============
|
3 |
|
4 | Babel preset for [dialog](https://dlg.im) projects.
|
5 |
|
6 | Installation
|
7 | ------------
|
8 |
|
9 | ```
|
10 | npm install --save-dev @dlghq/babel-preset-dialog
|
11 | ```
|
12 |
|
13 | Usage
|
14 | -----
|
15 |
|
16 | Add `@dlghq/babel-preset-dialog` to your `.babelrc`.
|
17 |
|
18 | ```json
|
19 | {
|
20 | "presets": [
|
21 | ["@dlghq/babel-preset-dialog", {
|
22 | "strict": false,
|
23 | "optimize": true,
|
24 | "typecheck": true
|
25 | }]
|
26 | ]
|
27 | }
|
28 | ```
|
29 |
|
30 | Options
|
31 | -------
|
32 |
|
33 | Name | Default | Description
|
34 | ---- | ------- | -----------
|
35 | `spec` | `false` | Enable spec compliance.
|
36 | `flow` | `false` | Convert flow-types to comments.
|
37 | `loose` | `true` | Enable loose mode.
|
38 | `react` | `true` | Enable react transforms.
|
39 | `es2015` | `true` | Enable ES2015 syntax.
|
40 | `esnext` | `true` | Enable ESNext syntax.
|
41 | `strict` | `true` | Add `"use strict";` to each file.
|
42 | `runtime` | `true` | Enable babel runtime. Requires `babel-runtime` package.
|
43 | `modules` | `true` | Enable ES2015 modules transforms.
|
44 | `helpers` | `false` | Enable babel external helpers.
|
45 | `optimize` | `false` | Enable optimization plugins.
|
46 | `typecheck` | `false` | Enable typecheck plugin.
|
47 | `development` | `false` | Enable development mode plugins.
|
48 |
|
49 | License
|
50 | -------
|
51 | [Apache-2.0](LICENSE)
|