September 2018
Intermediate to advanced
764 pages
20h 6m
English
The Babel CLI is the most common (and easiest) way to run Babel. It gives you an executable (babel) which you can use on the terminal to transpile files and directories. It is available on npmjs.com, and so we can install it using yarn:
# Install @babel/cli as a development dependency$ yarn add @babel/cli --dev# transpile a single file
$ babel example.js -o compiled.js# transpile an entire directory$ babel src -d build
Read now
Unlock full access