Setting up the project locally

Kent C. Dodds
InstructorKent C. Dodds
Share this video with your friends

Social Share Links

Send Tweet
Published 8 years ago
Updated 5 years ago

Before you start making your changes, you often need to set up your environment for the changes. This is where the repositories' contributing instructions come in really handy. In this lesson we’ll get our environment set up and ready for changes.

[00:00] Before we start making changes to the project, we should probably review the CONTRIBUTING file to check out any setup that needs to happen. We'll go to the file, and we'll look at setup instructions.

[00:12] We've already done a couple of these steps. Now it looks like the next step is to create a branch. We'll go ahead and do that, now.

[00:19] We'll type "git checkout" and "new branch." This is to create a new branch. We'll give it the prefix of pr/pad-left. Next it looks like we want to run npm install. We'll run npm install. When that finishes installing, we need to run npm t to run the test and npm run build.

[00:43] If everything works, then we're ready to make our changes. Npm is the package manager for Node projects. As this is distributed on npm as dependencies that are installed from npm, so if you don't have Node or npm installed, you're going to need to install those first before contributing to this project.

[01:01] With those dependencies installed, now we can run npm t && npm run build. This will run the tests. Npm run build. It looks like everything passed just fine. Now we are ready to start making our changes.

~ 7 years ago

Is the pr/ branch prefix a convention or does it change the branch behavior in some way?

Pramod Sutar
Pramod Sutar
~ 6 years ago

Hey, I Was following the steps but stuck in one step of command : npm t && npm run build sh: 1: cross-env: not found npm ERR! Test failed. See above for more details. Can you help me out?

Markdown supported.
Become a member to join the discussionEnroll Today