In order to be able to complete this entire workshop, we need to go ahead and get some tools downloaded. Even better if you can complete this before the workshop since conference Wi-Fi is notoriously spotty.

Clone the git repo

Click here.

node.js 6+

You probably can complete this with something less than node 4 but I’m using v6.9.1. Being the node.js LTS release, it’s a safe bet to be using. If you need to use a different version of node for work, I strongly recommend using nvm. I recommend getting the binary straight off the node website and not using homebrew for installation.

Yarn

We’re going to use Yarn for this workshop. In practice this will be a little differences to you, but what’s happening under the hood will be good for your app. Yarn will essentially replace your usage of the npm CLI client in your app. Instead of npm install --save react you’ll run yarn add react. This installs the same package from the same npm registry (it runs through their own proxy but as of writing the registry.yarnpkg.com address is just a dumb passthrough.)

If you haven’t installed yarn, install it via npm install --global yarn. You can also install it via homebrew: brew update && brew install yarn. Relevant tweet.

Yarn does a couple of things different from npm. One, it’s 100% deterministic. Deterministic is just a fancy way of saying that if you run yarn from any state, any time, 1000x times, it will still work the same way the 1001st time. npm’s installs are nondeterministic. If you run it from various states, it will install different ways.

Yarn does some better caching too. In fact, it does it so well you’ll see a significant reduction in your install times. Big code bases have seen a 10x reduction in install times.

Yarn also locks down your dependencies by default. It’s possible to do this with an npm shrinkwrap command but if you’ve ever had to maintain one of those, it can be messy. This locking down of dependencies means you don’t have to rely on npm authors doing semver correctly, a notoriously controversial subject

yarn installs

Run yarn from the directory where you downloaded the repo. If you have node and npm installed, you should see a list of dependencies being installed.

yarn global installs

Run the following global npm installs

yarn global add jest@v16.0.2
yarn global add nodemon
yarn global add webpack@v2.1.0-beta.25
yarn global add standard@v8.4.0

We’ll be using webpack v2.1.0-beta.25 (the stable version of v2 may be available by the time read this,) Jest v16.0.2 and standard v8.4.0. It doesn’t really matter version of nodemon you use. You don’t necessarily need these exact versions but you may run into issues if you use different major or minor releases as things make break between versions.