Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create babel-preset-latest #3625

Merged
merged 2 commits into from Aug 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/babel-preset-latest/.npmignore
@@ -0,0 +1,3 @@
src
test
node_modules
35 changes: 35 additions & 0 deletions packages/babel-preset-latest/README.md
@@ -0,0 +1,35 @@
# babel-preset-latest

> Babel preset including es2015, 2016, 2017.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll want to explain what "latest" means here. I'm not sure what we want to put yet though. We can change it after merging too.

Copy link
Member

@danez danez Aug 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we agree on latest? I still think it is very ambiguous and not clear on its own what it contains.
We also probably want independent package versions before releasing this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's a placeholder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hzoo

I think we'll want to explain what "latest" means here.

I agree with you but I am also not sure what is this called so I just use latest.

What about babel-preset-latest-proposals ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be babel-preset-es-latest


## Install

```sh
$ npm install --save-dev babel-preset-latest
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
"presets": ["latest"]
}
```

### Via CLI

```sh
$ babel script.js --presets latest
```

### Via Node API

```javascript
require("babel-core").transform("code", {
presets: ["latest"]
});
```
7 changes: 7 additions & 0 deletions packages/babel-preset-latest/index.js
@@ -0,0 +1,7 @@
module.exports = {
presets: [
require("babel-preset-es2015"),
require("babel-preset-es2016"),
require("babel-preset-es2017")
]
};
15 changes: 15 additions & 0 deletions packages/babel-preset-latest/package.json
@@ -0,0 +1,15 @@
{
"name": "babel-preset-latest",
"version": "0.0.1",
"description": "Babel preset including es2015, 2016, 2017",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"license": "MIT",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-preset-latest",
"main": "index.js",
"dependencies": {
"babel-preset-es2015": "^6.9.0",
"babel-preset-es2016": "^6.11.3",
"babel-preset-es2017": "0.0.1"
}
}