zenload
v3.0.0
Published
Load couple loaders and apply transform one-by-one
Downloads
109
Readme
Zenload
Load couple loaders and apply transforms one-by-one.
Install
npm i zenload -g
How to use?
Using configuration file .zenload.json
:
[
"escover",
"mock-import"
]
or using Environment Variable:
ZENLOAD=escover,mock-import node --loader zenload example.js
How it works?
It uses loader hooks.
Loads all loaders then apply them one-by-one. Source is passed overriding defaultLoad
, so nothing should be done
on loaders side. The only rule is get the source using provided by Node.js
team method: defaultLoad
.
This is the same as:
node \
--loader mock-import \
--loader escover \
example.js
That'a right, order should be backward, just like in a functions call chain.
Supported Loaders
- ✅ mock-import;
- ✅ escover;
- ✅ putout;
License
MIT