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 8 years ago by hzoo .
MIT · Repository · Original npm · Tarball · package.json
$ gnpm 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 (8 years ago)
  • 7.0.0-alpha.7                                ...           next (8 years ago)

9 Versions

  • 6.24.1 [deprecated]           ...           8 years ago
  • 7.0.0-alpha.7 [deprecated]           ...           8 years ago
  • 7.0.0-alpha.3 [deprecated]           ...           8 years ago
  • 6.24.0 [deprecated]           ...           8 years ago
  • 7.0.0-alpha.1 [deprecated]           ...           8 years ago
  • 6.22.0 [deprecated]           ...           8 years ago
  • 6.16.0 [deprecated]           ...           8 years ago
  • 6.14.0 [deprecated]           ...           8 years ago
  • 1.0.0 [deprecated]           ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (1)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |