gulp-rewrite-flowtyped-modules
v0.0.10
Published
A flow-syntax-aware module dependency rewriter gulp plugin.
Downloads
5
Readme
gulp-rewrite-flowtyped-modules
Rewrites modules dependencies
Implementation
Uses flow-parser
to scan the
potentially-flow-typed JavaScript AST file for import
and require
statements.
It rewrites modules according to the options passed in.
This behaves very similar to the
rewrite-module
in babel-preset-fbjs from the
fbjs package. The difference here is that
it isn't done through Babel, but through flow-parser
, and therefore keeps flow types intact.
Options
prefix
: Module prefix to prepend to all rewritten modules. (defaults to './'
)
map
: moduleMap to use for rewriting modules (empty by default)
flow
: options to pass to flow-parser
. See https://www.npmjs.com/package/flow-parser#options