0.0.1 • Published 8 years ago

babel-preset-yw v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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
        }
    ]
});
babel-plugin-add-module-exportsbabel-plugin-array-includesbabel-plugin-check-es2015-constantsbabel-plugin-namespacebabel-plugin-syntax-async-functionsbabel-plugin-syntax-async-generatorsbabel-plugin-syntax-class-propertiesbabel-plugin-syntax-export-extensionsbabel-plugin-syntax-flowbabel-plugin-syntax-function-bindbabel-plugin-syntax-object-rest-spreadbabel-plugin-transform-async-to-generatorbabel-plugin-transform-class-constructor-callbabel-plugin-transform-class-propertiesbabel-plugin-transform-decoratorsbabel-plugin-transform-decorators-legacybabel-plugin-transform-do-expressionsbabel-plugin-transform-es2015-arrow-functionsbabel-plugin-transform-es2015-block-scoped-functionsbabel-plugin-transform-es2015-block-scopingbabel-plugin-transform-es2015-classesbabel-plugin-transform-es2015-computed-propertiesbabel-plugin-transform-es2015-destructuringbabel-plugin-transform-es2015-duplicate-keysbabel-plugin-transform-es2015-for-ofbabel-plugin-transform-es2015-function-namebabel-plugin-transform-es2015-literalsbabel-plugin-transform-es2015-modules-commonjsbabel-plugin-transform-es2015-object-superbabel-plugin-transform-es2015-parametersbabel-plugin-transform-es2015-shorthand-propertiesbabel-plugin-transform-es2015-spreadbabel-plugin-transform-es2015-sticky-regexbabel-plugin-transform-es2015-template-literalsbabel-plugin-transform-es2015-typeof-symbolbabel-plugin-transform-es2015-unicode-regexbabel-plugin-transform-es3-member-expression-literalsbabel-plugin-transform-es3-property-literalsbabel-plugin-transform-exponentiation-operatorbabel-plugin-transform-export-extensionsbabel-plugin-transform-flow-strip-typesbabel-plugin-transform-function-bindbabel-plugin-transform-jscriptbabel-plugin-transform-object-assignbabel-plugin-transform-object-rest-spreadbabel-plugin-transform-proto-to-assignbabel-plugin-transform-react-jsx-sourcebabel-plugin-transform-regeneratorbabel-plugin-transform-runtimebabel-plugin-transform-strict-modebabel-plugin-transform-undefined-to-voidbabel-plugin-version-inlinebabel-preset-reactobject-assign
0.0.1

8 years ago