Setting Up The Development Environment

A guide for installing various technologies needed prior to coding the exercises in this book.

Table of Contents

Setting up the development environment#

Getting started is easy. Great care was taken to setup a development environment that can be used throughout the book, allowing you to focus on the content of each chapter. To start development, clone the repository from Github, install project dependencies, and run a script that runs a local Webpack development server. Each of these steps are outlined below.

Prerequisites#

The following tools should be installed prior to starting development.

Terminal application#

Which Terminal you use depends on your system. MacOS and Linux systems come with the Terminal application. For Windows 10 and above, all Terminal commands featured in this book should be run with PowerShell and Windows Subsystem for Linux. Follow these instructions to install Windows Subsystem for Linux. Running node scripts in Windows Subsystem for Linux ensures the commands will work.

git#

Changes to the codebase are tracked via git. git is a version control system that allows projects like this one to track changes across the codebase effectively. If you have little or no experience with git, don't worry. Each chapter clearly demonstrates the git commands you'll need to run to navigate between changes. git is installed differently depending on your system.

NodeJS#

node is a JavaScript runtime built from V8 JavaScript engine. Whereas JavaScript is usually run in a web browser, node runs server-side. node is traditionally used for back-end services, but it's also used to code tooling for JavaScript projects. npm is a package manager for node. npm packages can be installed in any node project, allowing you to reuse code published on the npm registry in a local development environment.

This book requires node 16 and above installed on your machine. It is highly recommended to install node and npm with nvm, the Node Version Manager. nvm allows you to install multiple versions of node locally, switching between them for each project on your system. Installation instructions for nvm can be found here.

JavaScript IDE#