-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathjustfile
62 lines (47 loc) · 2.04 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# add node bin script path for recipes
export PATH := "./node_modules/.bin:" + env_var('PATH')
# Default: display available recipes
_help:
@just --list
# –––––––––––––----------------------------------------------------------------
# Setup
# –––––––––––––----------------------------------------------------------------
# Set up the dev environment on a MacOS or GNU/Linux system
setup-dev-env:
scripts/setup-dev-env
# Install node modules
install *params:
npm install {{params}}
# Install node modules strictly as specified (typically for CI)
install-stable:
npm ci
# –––––––––––––----------------------------------------------------------------
# Run
# –––––––––––––----------------------------------------------------------------
# Start the server
start:
NODE_ENV=development ./bin/server
# –––––––––––––----------------------------------------------------------------
# Test & related
# –––––––––––––----------------------------------------------------------------
# Run tests with optional extra parameters
test *params:
NODE_ENV=test mocha {{params}}
# Run tests with detailed output
test-detailed *params:
NODE_ENV=test mocha --reporter=spec {{params}}
# Run tests with detailed output for debugging
test-debug *params:
NODE_ENV=test mocha --timeout 3600000 --reporter=spec --inspect-brk=40000 {{params}}
# Run tests and generate HTML coverage report
test-cover *params:
NODE_ENV=test nyc --reporter=lcov --reporter=text --report-dir=./coverage mocha {{params}}
# Run code linting
lint *params:
semistandard {{params}}
# –––––––––––––----------------------------------------------------------------
# Misc. utils
# –––––––––––––----------------------------------------------------------------
# Run source licensing tool (see 'licensing' folder for details)
license:
source-licenser --config-file .licenser.yml ./