Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leebyron/rollup-plugin-flow
Rollup plugin for removing Flow type annotations.
https://github.com/leebyron/rollup-plugin-flow
Last synced: 28 days ago
JSON representation
Rollup plugin for removing Flow type annotations.
- Host: GitHub
- URL: https://github.com/leebyron/rollup-plugin-flow
- Owner: leebyron
- License: other
- Created: 2016-07-24T11:00:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-01T00:51:41.000Z (over 4 years ago)
- Last Synced: 2024-04-23T22:19:46.648Z (8 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 80
- Watchers: 3
- Forks: 11
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - flow - Remove Flow type annotations. (Plugins / Code Quality)
README
Rollup Flow plugin
==================[![Build Status](https://travis-ci.org/leebyron/rollup-plugin-flow.svg?branch=master)](https://travis-ci.org/leebyron/rollup-plugin-flow)
This [Rollup](http://rollupjs.org/) plugin will remove [Flow](https://flowtype.org)
type annotations during bundling using [`flow-remove-types`](https://github.com/leebyron/flow-remove-types).## Install
```
npm install --save rollup-plugin-flow
``````js
var rollup = require('rollup').rollup;
var flow = require('rollup-plugin-flow');rollup({
entry: 'main.js',
plugins: [ flow() ]
}).then(...);
```## Options
Provide options as an object argument to `flow()`.
#### `all` - Transform all files, not just those containing `@flow` comments.
*Default:* `false`
```js
var flow = require('rollup-plugin-flow');module.exports = {
plugins: [ flow({ all: true }) ],
format: 'cjs'
};
```#### `pretty` - Remove flow types without replacing them with whitespace.
*Default:* `false`
*Note:* Typically source maps are not necessary for this transform, however
source maps are recommended when generating "pretty" results.```js
var flow = require('rollup-plugin-flow');module.exports = {
plugins: [ flow({ pretty: true }) ],
format: 'cjs'
};
```