Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    babel-preset-ywpublic

    This package has been deprecated

    Author message:

    This presets is under review

    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
            }
        ]
    });

    Keywords

    install

    npm i babel-preset-yw

    Downloadslast 7 days

    4

    version

    0.0.1

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar