3. Repeat until your changes work and are lint-free.
4. Check to make sure you’re not about to commit anything you don’t want to (
git
status
). If there are files you don’t want in Git, add them to your .gitignore file.
5. Add all of your changes to Git (
git add -A
; if you don’t want to add all the
changes, use
git add
for each file instead).
6. Commit your changes (
git commit -m "<description of your changes>"
).
Depending on the project, there may be other steps, such as running tests (usually as
a Gulp task), and pushing your code to a shared repository such as GitHub or Bit‐
bucket (
git push
). However, the steps listed here are a great framework to build on.
Throughout the rest of the book, we’ll present source code without repeating the
steps necessary to build and run it. Unless the example is explicitly browser code, all
of the code samples should run with Node. So, for example, if you’re given an exam‐
ple example.js, you would put that file in es6, and run it with:
$ gulp
$ node dist/example.js
You can also skip the Gulp step and run it directly with
babel-node
(though you will
not be saving any time, as
babel-node
also has to transcompile):
$ babel-node es6/example.js
Now it’s time to learn some JavaScript!
Conclusion | 31