babel-preset-power-assert
Babel preset for all power-assert plugins
Last updated 2 years ago by twada .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install babel-preset-power-assert 
SYNC missed versions from official npm registry.

power-assert

Build Status NPM version License

babel-preset-power-assert is a Babel preset for all power-assert plugins.

babel-preset-power-assert contains plugins below

INSTALL

$ npm install --save-dev babel-preset-power-assert power-assert

CAUTION

Babel7 is incompatible with Babel6.

For Babel6, you need to use the 2.x release of babel-preset-power-assert.

$ npm install --save-dev babel-preset-power-assert@2.0.0

HOW TO USE

via .babelrc (Recommended)

{
  "presets": [
    "power-assert"
  ]
}

via Babel CLI

$ babel --presets power-assert /path/to/src/target.js > /path/to/build/target.js

via Babel API

var babel = require('@babel/core');
var jsCode = fs.readFileSync('/path/to/src/target.js');
var transformed = babel.transform(jsCode, {
    presets: ['power-assert']
});
console.log(transformed.code);

AUTHOR

LICENSE

Licensed under the MIT license.

Current Tags

  • 3.0.0-beta.1                                ...           beta (2 years ago)
  • 3.0.0                                ...           latest (2 years ago)

4 Versions

  • 3.0.0                                ...           2 years ago
  • 3.0.0-beta.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.0.0                                ...           4 years ago

Copyright 2014 - 2016 © taobao.org |