babel/packages/babel-plugin-syntax-flow
Logan Smyth 5cd1276a27
Expose the Flow 'all' option on the preset too. (#8016)
| Q                        | A <!--(Can use an emoji 👍) -->
| ------------------------ | ---
| Fixed Issues?            | 
| Patch: Bug Fix?          | 
| Major: Breaking Change?  |
| Minor: New Feature?      |
| Tests Added + Pass?      | Yes
| Documentation PR         | <!-- If so, add `[skip ci]` to your commit message to skip CI -->
| Any Dependency Changes?  |
| License                  | MIT

The `all` option landed in https://github.com/babel/babel/pull/7934/files#diff-3a8233bcd2766d2c7d87f23f944f7726R3 but it is only exposed from the plugin, not the preset, so this exposes it there too since the flow preset is what we want people to use.
2018-05-23 13:40:22 -07:00
..
2017-03-25 21:46:16 -04:00
2018-05-14 17:15:44 -07:00

@babel/plugin-syntax-flow

Installation

npm install --save-dev @babel/plugin-syntax-flow

Usage

.babelrc

{
  "plugins": ["@babel/plugin-syntax-flow"]
}

Via CLI

babel --plugins @babel/plugin-syntax-flow script.js

Via Node API

require("@babel/core").transform("code", {
  plugins: ["@babel/plugin-syntax-flow"]
});