These instructions are for whichever group member is going to create the GitHub repo under their account. Other groups members will collaborate after these steps have been completed by one member of the group. You should still step through these together so everyone is aware of what goes into setting up a new repo.
-
Use the GitHub UI to create a new repo, and make sure you initialize it with a
READMEand a.gitignorefile. You can select a preset.gitignorefile from the dropdown menu.Nodeis usually a good one to choose. (Feel free to read more about gitignore files here). You can disregard the 'Add license' option. -
Make sure your repo has a relevant title and description. If you ultimately deploy your application so that it has a URL, you'll want to update your description to include a link to the deployed version.
-
Clone down your new repo locally and
cdinto the project directory. -
Once in your project directory, run
npm initand fill out the questions the best you can. If you don't know what to put for one of the questions that appears, simply hit enter. This will give you apackage.jsonfile and allow you to install dependencies likeeslint,mochaandchai. We will talk more about NPM later this inning, but for now you should install eslint, mocha and chai with:
npm install --save-dev eslint mocha chai
(You might also want to install mocha and eslint globally on your system, if you have not done so yet. This will allow you to run commands like mocha and eslint file-name.js in your terminal. You can do a global installation of these packages by running npm install -g eslint mocha in your terminal)
- Add the following linting configuration file to the root of your project directory. It should be named exactly
.eslintrc- all lowercase, with a dot in front of the name, and no file extension. (Don't worry if you get a warning in your text editor that says dot files are reserved for the filesystem. Just say ok and click out.)
-
Clone down the GitHub repo your partner has created. Your partner should invite you as a collaborator to the repo they just created, which means there is no need to fork it.
-
cdinto the project directory and runnpm install
