1
0
Fork 0
cautious-journey/docs/dev.md

1.8 KiB

Developer Guide

Setup

Linux

Install NodeSource repository and node:

> curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
> sudo apt-get install -y nodejs

Install yarnpkg repository and yarn:

> curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
> echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
> sudo apt update && sudo apt install yarn

Mac OS

Install brew:

> /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Install make, node, and yarn:

> brew install --with-default-names make
> brew install node yarn

Building

Building the app is done through make and its targets. To see a list of available targets:

> make help

Makefile:all                   builds, bundles, and tests the application
Makefile:build                 builds, bundles, and tests the application
Makefile:build-docs            generate html docs
Makefile:build-image           build a docker image
Makefile:clean                 clean up everything added by the default target
Makefile:clean-deps            clean up the node_modules directory
Makefile:clean-target          clean up the target directory
...

Compiling Typescript

> make
# or
> make ci

This will compile the code and run tests.

Running Mocha Tests

Tests use Mocha: https://mochajs.org/#getting-started