Skip to content

Repository Setup

Frank Matranga edited this page Sep 17, 2019 · 5 revisions

tl;dr - git clone https://github.com/Apexal/late.git; cd late/; git checkout dev; git pull origin dev; npm install

a. Clone Repository

If you are unfamiliar with Git, check this writeup out. To work with LATE, you need a local copy of the project and its files, called the repo. You must "clone" the repo from GitHub since it is the central source of the project code.

If you are using a Git client like GitHub Desktop then cloning the repository Apexal/late should be easy.

For command line (WSL/Linux/Mac): $ git clone https://github.com/Apexal/late.git (do not include $)

Once you have cloned the repository, navigate to it in a terminal (e.g. $ cd late/) to run the following commands. Whenever you are working on LATE you must have a terminal window opened in the folder.

b. Switch to Development Branch

Once you are in the folder, checkout the dev branch of the repo with $ git checkout dev and then pull with $ git pull origin dev. This will switch you to the branch of the project that gets developed and updated actively. All branches you make should start from dev.

c. Install Dependencies

In a terminal (try using VSCode's terminal!) run $ npm install to download all of the Node packages that LATE depends on to run. This is a one time thing and only needs to be run again if a new dependency is added to the project (not too common). If you ever see an error talking about a package missing, try running $ npm install again. This might take a minute...

d. NPM Scripts

There are a handful of important scripts handled through Node and NPM that are used to run and test LATE. Here are the most important ones:

  • $ npm run frontend This starts a hot-reloading server that serves the Vue frontend (only).
  • $ npm run backend This starts the Koa server that provides the API.
  • $ npm run build This compiles all of the frontend to generate the final HTML, JS, and CSS files. This is not used when developing.