Skip to content
Babel preset for all power-assert plugins
Branch: master
Clone or download
Latest commit 7975955 Aug 30, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore chore: ignore actual output dumps Mar 30, 2018
.travis.yml chore(travis): update Node versions with EOL memo Aug 30, 2018
CHANGELOG.md
LICENSE chore(license): update copyright year Jan 17, 2018
README.md
index.js refactor(babel7): use @babel/helper-plugin-utils to ensure `assertVer… Mar 30, 2018
package-lock.json 3.0.0 Aug 30, 2018
package.json 3.0.0 Aug 30, 2018

README.md

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.

You can’t perform that action at this time.