Course Banner

Build the Application

Introduction

With a package.json file present and PnPM installed it is time to build the application. A "build" can occur both locally and remotely. In this case, we will do so locally, so that we can develop and test our application to make sure it does what we want. Keep in mind that a build is not the same as running our application. These are different steps.

Video Overview

The video provides a general overview of the activity, but does not contain the detail needed to complete each process. Watch the video to obtain a general idea, but follow the written steps to complete the activity. This is the Transcript of the video.

Run PnPM to Build the Application

  1. Make sure your application is open in VSC.
  2. Open a terminal window, (Terminal > New Terminal) or (Control + Shift + `).
  3. Type pnpm install, press "Enter"
  4. PnPM will now read the package.json file and download and install each of the dependencies listed in the file.
  5. Be patient while this process occurs, but it should not take too long.
  6. When done, you will now have a new node_modules folder and pnpm-lock.yaml file.
  7. You should never alter anything inside the node_modules folder or the pnpm-lock.yaml file!

Review the .gitignore file

As described in a previous document, the .gitignore file tells GIT to ignore any file or folder listed and that includes not adding them to a remote repository. We'll review that file now.

  1. Open the .gitignore file.
  2. Notice that the node_modules folder is already listed (see line 8). This folder can become very large and there is no reason to add it to the remote repository.
  3. While here, look at how to add a comment to the file.
  4. Close the file.