Awesome
<a id="app-top"></a> Practice Modern JavaScript
A boilerplate to setup and practice Modern JavaScript
<a id="toc"></a> Table of Contents
- Requirements
- Installation Instructions
- Nodemon
- Dependencies
- How to Use
- Watch
- Write
- Output
- Examples
- Example 1
- Example 2
- Technologies Used
- Help & Support
- Contributors
- License
- Contact
<a id="req"></a>Requirements <a href="#toc" title="Table of Contents"><kbd>⮭</kbd></a>
- Latest NodeJS (>= v6)
<a id="install"></a>Installation <a href="#toc" title="Table of Contents"><kbd>⮭</kbd></a>
1.<a id="nodemon"></a> Install nodemon
globally for watching for file changes while running the code :beginner: :package:
$ npm install -g nodemon # npm i -g nodemon
2.<a id="dependencies"></a> Install all dependencies :beginner: :package:
$ yarn install
<a id="usage"></a>Usage <a href="#toc" title="Table of Contents"><kbd>⮭</kbd></a>
1. <a id="watch"></a>Start watching for file changes :eyes:
$ yarn run watch # yarn start
2. <a id="write"></a>Start writing modern JavaScript in src/index.js
file :memo:
// my-module.js
export const name = 'My Module'
// index.js
import * as myModule from './my-module'
console.log(myModule.name) // 'My Module'
3. <a id="output"></a>Enjoy the output :joy:
$ yarn start
My Module
<a id="examples"></a>Examples
1. <a id="example-1"></a>Example 1 <a href="#toc" title="Table of Contents"><kbd>⮭</kbd></a>
// async-await.js
const prom = new Promise(resolve => {
resolve(`Hello`)
})
const longRun = async () => {
const res = await prom
console.log(res)
}
longRun()
2. <a id="example-2"></a>Example 2 <a href="#toc" title="Table of Contents"><kbd>⮭</kbd></a>
// array-includes.js
const includes3 = [1, 3, 4].includes(3)
console.log(includes3)
<a id="techs"></a>Technologies Used <a href="#toc" title="Table of Contents"><kbd>⮭</kbd></a>
- Babel — Transpiles modern JS to compatible and runnable JS
- babel-preset-modern-node — A preset for Babel with required plugins
<a id="help"></a>Help & Support <a href="#toc" title="Table of Contents"><kbd>⮭</kbd></a>
- BabelJS — BabelJS Slack Chat Room
- FreeCodeCamp/FreeCodeCamp — FreeCodeCamp Gitter Chat Room
- nodejs/node — NodeJS Gitter Chat Room
<a id="contrib"></a>Contributors <a href="#toc" title="Table of Contents"><kbd>⮭</kbd></a>
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --><br /><sub>Abhisek Pattnaik</sub><br />💻 🎨 📖 💡 |
---|
This project follows the all-contributors specification.
All types of Contributions are Welcome :pray:
<a id="license"></a>License <a href="#toc" title="Table of Contents"><kbd>⮭</kbd></a>
<a id="contact"></a>
<p align="center"> Tweet <kbd><a href="https://twitter.com/abhisek"><b><img src="https://i.imgur.com/wOPZd0Y.png?1"> @abhisek</b></a></kbd><br> Know <kbd><b><a href="https://about.me/abhisekp">about/abhisekp</a></b></kbd><br> Chat with <kbd><a href="https://gitter.im/abhisekp"> <img src="https://i.imgur.com/ThSWa6Y.png?2"> <b>@abhisekp</b></a></kbd> </p><div align="right"> <a href="#toc" title="Table of Contents"><kbd><b>Table of Contents ⮭</b></kbd></a><br> <a href="#app-top"><kbd><b>back to top ⮭</b></kbd></a> </div>