Skip to content

Commit

Permalink
Merge pull request verekia#236 from StanLindsey/patch-1
Browse files Browse the repository at this point in the history
replace 'by' with 'with' for better grammar
  • Loading branch information
verekia committed Jul 2, 2017
2 parents 8e63983 + a354ff5 commit 7271d32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tutorial/02-babel-es6-eslint-flow-jest-husky.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ We're using a *template string* here, which is an ES6 feature that lets us injec

Babel CLI comes with [two executables](https://babeljs.io/docs/usage/cli/): `babel`, which compiles ES6 files into new ES5 files, and `babel-node`, which you can use to replace your call to the `node` binary and execute ES6 files directly on the fly. `babel-node` is great for development but it is heavy and not meant for production. In this chapter we are going to use `babel-node` to set up the development environment, and in the next one we'll use `babel` to build ES5 files for production.

- In `package.json`, in your `start` script, replace `node .` by `babel-node src` (`index.js` is the default file Node looks for, which is why we can omit `index.js`).
- In `package.json`, in your `start` script, replace `node .` with `babel-node src` (`index.js` is the default file Node looks for, which is why we can omit `index.js`).

If you try to run `yarn start` now, it should print the correct output, but Babel is not actually doing anything. That's because we didn't give it any information about which transformations we want to apply. The only reason it prints the right output is because Node natively understands ES6 without Babel's help. Some browsers or older versions of Node would not be so successful though!

Expand Down

0 comments on commit 7271d32

Please sign in to comment.