Project Setup
Before we crack on with the code, we'll initialise Git to track our project using version control, we'll create a package.json so we can use Jest, and we'll install a linter to keep the code clean as we go along.
-
Create a
cruise-shipsrepository on GitHub without a README. -
Create a
cruise-shipsdirectory in the command line. -
cdintocruise-shipsand initialise a Git repo. -
Initialise an npm project, setting
jestas the test command. -
Install the
jestpackage as a developer dependency. -
Create a
.gitignorefile in the project root and addnode_modules/to it. -
Add all of your files to the staging area.
-
Commit your changes with a clear message.
-
Add a new
originremote that points to your GitHub repository:git remote add origin <https_link_to_your_repo>. -
Push the project to your newly created GitHub repository.