This package has been deprecated

Author message:

This presets is under review

babel-preset-yw

0.0.1 • Public • Published

babel-preset-yw

Build Status npm downloads

A Babel preset that extends ES2015 preset and adds features like async/await, JSX and Flow types. Optimal reconfigured babel settings. Includes optional compatibility presets for targeting different environment.

Usage instructions

Installation

Install via NPM:

$ npm install -D babel-preset-yw

Basic Usage

Via .babelrc (Recommended)

Create a .babelrc file in your project root, and include 'yw' in your "presets" path:

.babelrc

{
  "presets": ["yw"]
}

Via CLI

$ babel script.js --presets yw

Via Node API

If you don't want to use a project-wide .babelrc file (as above):

require('babel-core').transform('code', {
    presets: ['yw']
});

Webpack, Gulp, Browserify, etc

Follow vendor instructions and include yw in your babel "presets" list.

Advanced Usage

require('babel-core').transform('code', {
    presets: [
        require('babel-preset-yw/configure')({
            flow: true,
            jsx: false,
            version: true,
            regex: true,
            symbol: true,
            es3: true,
            async: true,
            strict: false,
            compatibility: true,
            common: false
        }
    ]
});

Readme

Keywords

Package Sidebar

Install

npm i babel-preset-yw

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • yudha