maintains an excellent
ES7) features. As of August 2015, the most complete implementation (Babel) is only
at 72%. While that may sound discouraging, it’s the most important features that have
been implemented first, and all of the features discussed in this book are available in
Babel.
We have a little bit of prep work to do before we can start transcompiling. We’ll need
to make sure we have the necessary tools, and learn how to set up a new project to
use them—a process that will become automatic after you do it a few times. In the
meantime, you will probably want to refer back to this chapter as you start new
projects.
Installing Git
If you don’t have Git installed on your system, you can find downloads and instruc‐
tions for your operating system on the
The Terminal
Throughout this chapter, we’ll be working in the terminal (also known as the com‐
mand line or command prompt). The terminal is a text-based way of interacting with
your computer, and is commonly used by programmers. Though it is certainly possi‐
ble to be an effective programmer without ever using the terminal, I believe it is an
important skill to have: many tutorials and books assume you’re using a terminal, and
many tools are designed to be used on the terminal.
The most ubiquitous terminal experience is a shell (terminal interface) called bash,
and it is available by default on Linux and OS X machines. While Windows has its
own command-line experience, Git (which we will install next) provides a bash com‐
mand line, which I recommend you use. In this book, we will be using bash.
On Linux and OS X, look in your programs for the Terminal program. On Windows,
after you install Git, look for “Git Bash” in your programs.
When you start the terminal, you see a prompt, which is where you will type com‐
mands. The default prompt may include the name of your computer or the directory
you’re in, and it will normally end with a dollar sign ($). Thus, in the code samples in
this chapter, I will use a dollar sign to indicate the prompt. What follows the prompt
is what you should type. For example, to get a listing of the files in the current direc‐
tory, type
ls
at the prompt:
$ ls
In Unix, and therefore bash, directory names are separated with a forward slash (
/
).
Even in Windows, where directories are normally separated by backslashes (
\
), Git
ES6 Features | 17