@lectro/enhancer-flowruntime
v1.1.2-alpha-4
Published
Lectro with Flow Runtime
Downloads
25
Readme
Lectro Enhancer Flowruntime
Add Flowruntime checking to your code.
Usage
- Install the module
yarn add @lectro/enhancer-flowruntime - Create a devserver file
dev.jswith the following contents
const Lectro = require('@lectro/enhancer-flowruntime');
const lectro = new Lectro
lectro.dev()Use
node dev.jsto run devserverThis will run the contents of
src/index.jsfile with all the necessary transformations and runtime checks.With Flow Runtime you'll get runtime errors for every annotated Function passed with wrong parameters
To combine
Enchancer-Flowruntimewith other lectro enhancements follow this
const EnchancerFlowruntime = require('@lectro/enhancer-flowruntime')
const EnhancerCommonutils = require('@lectro/enhancer-commonutils')
const lectro = EnchancerFlowruntime.combine(new EnhancerCommonutils)
lectro.dev()- To build your bundle
const EnchancerFlowruntime = require('@lectro/enhancer-flowruntime')
const lectro = new EnchancerFlowruntime
// or this if you want to combine with other enhancer
const EnhancerCommonutils = require('@lectro/enhancer-commonutils')
const lectro = EnchancerFlowruntime.combine(new EnhancerCommonutils)
lectro.build()Use
node build.jsto run buildThis will build the contents of
src/index.jsfile with all the necessary transformations tobuild/main.js.Runtime checks are disabled in Production builds.
