Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reggi/esnext-boilerplate
:circus_tent: ESnext boilerplate including async / await support
https://github.com/reggi/esnext-boilerplate
Last synced: about 1 month ago
JSON representation
:circus_tent: ESnext boilerplate including async / await support
- Host: GitHub
- URL: https://github.com/reggi/esnext-boilerplate
- Owner: reggi
- Created: 2015-11-05T22:06:06.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-10T22:48:33.000Z (about 9 years ago)
- Last Synced: 2024-10-05T10:50:40.467Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 0 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ESNext Boilerplate
```bash
# clone this repo
git clone https://github.com/reggi/esnext-boilerplate.git
# cd into the downloaded repo
cd esnext-boilerplate
# install babel (locally)
npm install
# use this to watch the src dir
npm run babel-node-watch
# or just run babel with
npm run babel-node
```# Async / Await
Below is an example using `async` and `await`. You have to make sure the dependency `"babel-polyfill"` is included.
```js
import "babel-polyfill"async function five() {
return 5
}async function helloWorld() {
var numb = await five()
console.log(numb)
}helloWorld() // logs `5`
```