Flow Status Webpack Plugin
![npm downloads](https://img.shields.io/npm/dm/flow-status-webpack-plugin.svg?style=flat-square)
This webpack plugin will automatically start a Flow server (or restart if one is running) when webpack starts up, and run flow status
after each webpack build. Still experimental.
If you have any idea on how to get it better, you're welcome to contribute!
Requirements
You need to have Flow installed. To do that, follow these steps.
Installation
npm install flow-status-webpack-plugin --save-dev
Usage
var FlowStatusWebpackPlugin = require('flow-status-webpack-plugin');
module.exports = {
...
plugins: [
new FlowStatusWebpackPlugin()
]
}
It will generate an output like this:
![Flow has no errors](http://i.imgur.com/GX2xg8J.png?1)
or, in case of some error:
![Flow has errors](http://i.imgur.com/4cnu50c.png?1)
Configuration
If you want to pass additional command-line arguments to flow start
, you can pass a flowArgs
option to the plugin:
var FlowStatusWebpackPlugin = require('flow-status-webpack-plugin');
module.exports = {
...
plugins: [
new FlowStatusWebpackPlugin({
flowArgs: '--lib path/to/interfaces/directory'
})
]
}
If you don't want the plugin to automatically restart any running Flow server, pass restartFlow: false
:
var FlowStatusWebpackPlugin = require('flow-status-webpack-plugin');
module.exports = {
...
plugins: [
new FlowStatusWebpackPlugin({
restartFlow: false
})
]
}
License
This plugin is released under the MIT License.