babel-preset-latest

Babel preset including es2015+

We're super ๐Ÿ˜ธ excited that you're trying to use ES2017+ syntax, but instead of making more yearly presets ๐Ÿ˜ญ , Babel now has a better preset that we recommend you use instead: npm install babel-preset-env --save-dev. preset-env without options will compile ES2015+ down to ES5 just like using all the presets together and thus is more future proof. It also allows you to target specific browsers so that Babel can do less work and you can ship native ES2015+ to user ๐Ÿ˜Ž ! We are also in the process of releasing v7, so please give http://babeljs.io/blog/2017/09/12/planning-for-7.0 a read and help test it out in beta! Thanks so much for using Babel ๐Ÿ™, please give us a follow on Twitter @babeljs for news on Babel, join slack.babeljs.io for discussion/development and help support the project at opencollective.com/babel
Last updated 3 years ago by hzoo .
MIT ยท Repository ยท Original npm ยท Tarball ยท package.json
$ cnpm install babel-preset-latest 
SYNC missed versions from official npm registry.

babel-preset-latest

Babel preset including es2015, es2016, es2017.

Install

npm install --save-dev babel-preset-latest

Usage

Via .babelrc (Recommended)

.babelrc

{
  "presets": ["latest"]
}

Via CLI

babel script.js --presets latest

Via Node API

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

Options

es2015

boolean, defaults to true.

Toggles including plugins from the es2015 preset.

{
  "presets": [
    ["latest", {
      "es2015": false
    }]
  ]
}

You can also pass options down to the es2015 preset.

{
  "presets": [
    ["latest", {
      "es2015": {
        "modules": false
      }
    }]
  ]
}

Note: This also works for the other preset-year options below.

es2016

boolean, defaults to true.

Toggles including plugins from the es2016 preset.

es2017

boolean, defaults to true.

Toggles including plugins from the es2017 preset.

Current Tags

  • 6.24.1                                ...           latest (3 years ago)
  • 7.0.0-alpha.7                                ...           next (3 years ago)

9 Versions

  • 6.24.1 [deprecated]           ...           3 years ago
  • 7.0.0-alpha.7 [deprecated]           ...           3 years ago
  • 7.0.0-alpha.3 [deprecated]           ...           3 years ago
  • 6.24.0 [deprecated]           ...           3 years ago
  • 7.0.0-alpha.1 [deprecated]           ...           3 years ago
  • 6.22.0 [deprecated]           ...           3 years ago
  • 6.16.0 [deprecated]           ...           4 years ago
  • 6.14.0 [deprecated]           ...           4 years ago
  • 1.0.0 [deprecated]           ...           4 years ago
Maintainers (1)
Downloads
Today 49
This Week 677
This Month 263
Last Day 214
Last Week 977
Last Month 4,748
Dependencies (3)
Dev Dependencies (1)
Dependents (736)

Copyright 2014 - 2016 ยฉ taobao.org |