[DEPRECATED] A Webpack loader for Flowcheck
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
index.js
package.json

README.md

This repo is deprecated, please migrate to babel-plugin-tcomb which is now Flow compatible

flowcheck-loader

This is a Webpack loader for Flowcheck.

Flowcheck is a runtime assertions library that uses Flow syntax but is meant to be ran in development.

npm install --save-dev flowcheck-loader

Chain this loader with jsx?stripTypes so types are stripped in JS code:

// Webpack config
module.exports = {
  ...
  module: {
    loaders: [
      { test: /\.jsx?$/, loaders: ['jsx?harmony&stripTypes', 'flowcheck'], exclude: /node_modules/ }
    ]
  }
};

For production builds, just leave flowcheck out so jsx?stripTypes strips them completely.

You can use this with or without using Flow or TypeScript itself.
It can also be a nice first step towards migrating code to Flow.

Read more about Flowcheck