Skip to content

poooi/poi-util-transpile

Repository files navigation

Poi-util-transpile

npm package

Util for transpiling poi plugins

Compatibility

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.

Howto

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 and postpublish (optional) scripts in package.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

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]

Changelog

10.3.0 (^10.3.0 compatible)

update settings from poi v10, added TypeScript support

8.2.2 (^8.2.0 compatible)

use [email protected] following main poi's settings, code might not be compatible since the target is set to Electron 1.8.

8.0.0 (^8.0.0 compatible)

add babel-plugin-closure-elimination, this does not break the compatibility with 7.6.x ~ 7.10.x