As a babel plugin
obligatory note: babel-blade is not yet production ready! Please proceed only if you are an early adopter. Feel free to chat with @swyx or check our issues!
Installation
npm install --save-dev babel-plugin-blade
If you want to use it with babel@7, you should also install babel-core@^7.0.0-0
(just to prevent peer dep warnings).
Usage
.babelrc
(Recommended)
Via .babelrc
{
"plugins": ["babel-plugin-blade"]
}
Via CLI
babel --plugins babel-plugin-blade script.js
Via Node API
require('babel-core').transform('code', {
plugins: ['babel-plugin-blade']
});