espower-typescript-babel

0.2.0 • Public • Published

espower-typescript-babel (experimental) NPM version Dependency Status

power-assert instrumentor for TypeScript and Babel

  1. Transpile from TypeScript to ES6 with typescript-simple
  2. Transpile from ES6 to ES5 with babel
  3. Instrument with power-assert
  4. Run tests

Why?

  • TypeScript cannot transpile some features (generator, async/await) to ES5
  • Babel can do it
  • Zero configuration and zero temporary file for power-assert

Usage

Put tsconfig.json (target: ES6) and .babelrc in your project root, then

$ npm i -D espower-typescript-babel
$ mocha --compilers ts:espower-typescript-babel/guess test/**/*.ts

Also you need to npm i -D babel-preset-es2015, if you use babel presets like babel-preset-es2015 in .babelrc.

License

MIT License: Teppei Sato <teppeis@gmail.com>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    1
  • 0.1.1
    0
  • 0.1.0
    1
  • 0.0.2
    0

Package Sidebar

Install

npm i espower-typescript-babel

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • teppeis