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-ships
repository on GitHub without a README. -
Create a
cruise-ships
directory in the command line. -
cd
intocruise-ships
and initialise a Git repo. -
Initialise an npm project, setting
jest
as the test command. -
Install the
jest
package as a developer dependency. -
Create a
.gitignore
file 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
origin
remote that points to your GitHub repository:git remote add origin <https_link_to_your_repo>
. -
Push the project to your newly created GitHub repository.