You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,8 +27,6 @@ Code examples are available for each chapter, and you can run them all with `yar
27
27
28
28
**Every chapter contains the code of previous chapters**, so if you are simply looking for a boilerplate project containing everything, just clone the last chapter and you're good to go.
29
29
30
-
Note: The order of chapters is not necessarily the most educational. For instance, testing / type checking could have been done before introducing React. It is quite difficult to move chapters around or edit past ones, since I need to apply those changes to every following chapter. If things settle down, I might reorganize the whole thing in a better way.
31
-
32
30
The code of this tutorial works on Linux, macOS, and Windows.
Copy file name to clipboardExpand all lines: tutorial/01-node-yarn-package-json/README.md
+22-6Lines changed: 22 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
-
# 01 - Node, NPM, Yarn, and package.json
1
+
# 01 - Node, NVM, NPM, Yarn, and `package.json`
2
2
3
3
In this section we will set up Node, NPM, Yarn, a basic `package.json` file, and try a package.
4
4
5
-
## Installing Node and NPM
5
+
## Node
6
6
7
-
First, we need to install Node, which is not only used for back-end JavaScript, but all the tools we need to build a modern Front-End stack.
7
+
> 💡 **Node.js** is a JavaScript runtime environment. It is mostly used for Back-End development, but also for general scripting. In the context of Front-End development, it can be used to perform a whole bunch of tasks like linting, testing, and assembling files.
8
+
9
+
We're going to use Node for basically everything in this tutorial, so you're going to need it.
8
10
9
11
Head to the [download page](https://nodejs.org/en/download/current/) for macOS or Windows binaries, or the [package manager installations page](https://nodejs.org/en/download/package-manager/) for Linux distributions.
`npm`, the default package manager for Node, comes automatically with Node, so you don't have to install it yourself.
22
+
## NVM
23
+
24
+
If Node is already installed, or if you want more flexibility, install `nvm` ([Node Version Manager](https://github.com/creationix/nvm)), make `nvm` install and use the latest version of Node for you.
25
+
26
+
## NPM
21
27
22
-
**Note**: If Node is already installed, or if you want more flexibility, install `nvm` ([Node Version Manager](https://github.com/creationix/nvm)), make `nvm` install and use the latest version of Node for you.
28
+
> 💡 **NPM** is the default package manager for Node. It is automatically installed alongside with Node. Package managers are used to install and manage packages (modules of code that you or someone else wrote).
29
+
30
+
We are going to use a lot of packages in this tutorial, but we won't be using NPM
23
31
24
32
## Yarn
25
33
26
-
[Yarn](https://yarnpkg.com/) is another package manager which is much faster than NPM, has offline support, and fetches dependencies [more predictably](https://yarnpkg.com/en/docs/yarn-lock). Since it [came out](https://code.facebook.com/posts/1840075619545360) in October 2016, it received a very quick adoption and is becoming the new package manager of choice of the JavaScript community. We are going to use Yarn in this tutorial. If you want to stick to NPM you can simply replace all `yarn add` and `yarn add --dev` commands of this tutorial by `npm install --save` and `npm install --dev`.
34
+
> 💡 **[Yarn](https://yarnpkg.com/)** is another package manager which is much faster than NPM, has offline support, and fetches dependencies [more predictably](https://yarnpkg.com/en/docs/yarn-lock).
35
+
36
+
Since it [came out](https://code.facebook.com/posts/1840075619545360) in October 2016, it received a very quick adoption and is becoming the new package manager of choice of the JavaScript community. We are going to use Yarn in this tutorial. If you want to stick to NPM you can simply replace all `yarn add` and `yarn add --dev` commands of this tutorial by `npm install --save` and `npm install --dev`.
27
37
28
38
- Install Yarn by following the [instructions](https://yarnpkg.com/en/docs/install). You can likely install it with `npm install -g yarn` or `sudo npm install -g yarn` (yeah, we're using NPM to install Yarn, much like you would use Internet Explorer or Safari to install Chrome!).
0 commit comments