GithubHelp home page GithubHelp logo

babel-features's Introduction

babel-features

Test babel features, can be used to generate babel options for specific compilation targets

NOTE: The latest version (2.x) is for babel 6.x, for babel 5.x please use version 1.x

Install

npm install babel-features@latest

Usage

Node.js

var features = require('babel-features').test()
console.log(features)
// output on Node.js 5.0.0:
// { 'es3-member-expression-literals': true,
//   'es3-property-literals': true,
//   'es5-property-mutators': true,
//   'es2015-arrow-functions': true,
//   'es2015-block-scoping': true,
//   'es2015-classes': true,
//   'es2015-computed-properties': true,
//   'es2015-constants': true,
//   'es2015-destructuring': false,
//   'es2015-for-of': true,
//   'es2015-function-name': false,
//   'es2015-literals': true,
//   'es2015-object-super': true,
//   'es2015-parameters': false,
//   'es2015-shorthand-properties': true,
//   'es2015-spread': false,
//   'es2015-sticky-regex': false,
//   'es2015-template-literals': true,
//   'es2015-typeof-symbol': true,
//   'es2015-unicode-regex': false,
//   'es2015-modules': false,
//   'es2015-generators': false,
//   'es3-function-scope': true }

Use babel preset

See https://github.com/ariporad/babel-preset-features

Use babel register

var babelOptions = require('babel-features').options()
require('babel-core/register')(babelOptions)

TODO

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.