Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonespa/plain-babel
A simple example of plain babel configuration
https://github.com/simonespa/plain-babel
babel babel-polyfill es6 polyfill
Last synced: 23 days ago
JSON representation
A simple example of plain babel configuration
- Host: GitHub
- URL: https://github.com/simonespa/plain-babel
- Owner: simonespa
- Created: 2017-09-12T17:33:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-12T17:34:22.000Z (over 7 years ago)
- Last Synced: 2024-12-06T22:11:02.904Z (about 1 month ago)
- Topics: babel, babel-polyfill, es6, polyfill
- Language: JavaScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# plain-babel
This exercise is to understand how to use plain babel and configure it.## Objective
The objective of this repo is to use plain babel in order to learn how static transpiling and runtime polyfill works.## Related links
* https://babeljs.io/
* https://babeljs.io/docs/usage/polyfill## Get started
Feel free to play with `es6.js` and add some more [ES6 syntax](https://babeljs.io/learn-es2015/). Assuming you already run `yarn install`, we can now transpile it by running `yarn transpile`. This command will generate `transpiled-es5.js`. Now you can run the final ES5 code with `yarn start`.Notice that `es6.js` uses Promise, and since babel transpiling is static, you need to have a polyfill at runtime that provide the Promise API.