Util for transpiling poi plugins
This util is designed for poi 7.6.0
and later versions. Other versions are not guaranteed. An apiVer
for 7.6.0-beta.1
is probably necessary if you use features like async/await
that was transpiled with different presets in previous babel config.
You're expected to use npm^5
and node^7.6
.
- install this package as dev-dependecy:
npm install --save-dev poi-util-transpile
- add
prepack
andpostpublish
(optional) scripts inpackage.json
section:
note: since prepublish
script is also run during npm install
, we use newly introduced prepack
instead.
"prepack": "poi-util-transpile",
"postpublish": "git clean -f && git checkout .",
Usage: poi-plugin-transpile [source] [options]
Options:
--sm, --source-map saves sourcemap to .js.map file and/or inline. same as
babel sourceMaps option, if provided with no value, it
will default to true [string]
--replace removes .es files [boolean]
-h, --help Show help [boolean]
update settings from poi v10, added TypeScript support
use [email protected]
following main poi's settings, code might not be compatible since the target is set to Electron 1.8
.
add babel-plugin-closure-elimination
, this does not break the compatibility with 7.6.x ~ 7.10.x