Lesson Weekend

While it's important to practice installing dependencies with npm and manually setting up a package.json file, it would be painful to have to do this for every project. As long as the root directory of a project contains a package.json file that lists all the packages we'll need, we can just run npm install to get our project up and running.

Here is our shape-tracker repository so far:


Example GitHub Repo for Shape Tracker

If you clone this environment, make sure that you are referencing the code from the first commit, which has the name "project with functioning environment". See the last lesson for more information on navigating through commits. Don't forget you can also download the code by clicking Download ZIP. That will give you a starting environment for your projects.

Everything in this configuration is reusable for future projects. However, we recommend setting up your configuration from scratch for at least a few projects. This will give you more experience with setting up a development environment.

Note: The project above was set up on a Mac machine. If you are using a Windows machine, running two commands in one script with a ';' won't work. We'll instead need to join the two with "&" like this: "start": "npm run build & webpack-dev-server --open --mode development".

One last thing: you should always specify the project name and author when reusing a package.json file.

Lesson 20 of 48
Last updated more than 3 months ago.