Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jansanchez/babel-demo
demo babel es2015
https://github.com/jansanchez/babel-demo
Last synced: 26 days ago
JSON representation
demo babel es2015
- Host: GitHub
- URL: https://github.com/jansanchez/babel-demo
- Owner: jansanchez
- License: mit
- Created: 2016-02-07T05:12:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-02-07T05:30:45.000Z (over 8 years ago)
- Last Synced: 2023-03-31T16:15:46.906Z (over 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# babel-demo
demo babel + es2015## Dependencies
### Install babel-cli globally
```bash
sudo npm install babel-cli -g
```### Dev Dependencies
```bash
sudo npm install babel-cli --save-dev
``````bash
sudo npm install babel-preset-es2015 --save-dev
``````bash
sudo npm install xo --save-dev
```### input: ./index.js
```js
const options = ['yes', 'no'];(con => {
options.forEach(item => {
con.log(item);
});
})(console);
```### output: ./dest/index.js
```js
'use strict';var options = ['yes', 'no'];
(function (con) {
options.forEach(function (item) {
con.log(item);
});
})(console);
```