Level: Intermediate to Advanced.
Part 6 – Going Back In Time
To get started with a command line interface, install babel-cli using npm.
$ npm install -g babel-cli babel-preset-es2015
To transpile, run babel and specify the source folder and destination folder.
$ babel src -d dest
An alternative to Babel is Google Traceur,
Back to the Future
To get started with the command line interface, install lebab using npm.
$ npm install -g lebab
To transpile, run lebab and specify the file and the output file.
$ lebab es5.js –o es6.js
Throughout this series various ES6 features have been covered like Block Scoping, Classes, Arrow and Spread Operators and so much more. In this last part, we show you how to start using ES6 features either by going back in time or back to the future with Babel and es6-shim.
Missed the Previous Parts?
You can read the previous parts here: