-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (25 loc) · 896 Bytes
/
Makefile
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
.PHONY: build test run watch serve format check-format code-gen copy node2nix
nix-sources := $(shell fd --no-ignore-parent -enix --exclude='spago*')
js-sources := $(shell fd --no-ignore-parent -ejs -ecjs)
build:
spago build
test:
spago test
format:
@purs-tidy format-in-place "src/**/*.purs"
@purs-tidy format-in-place "test/**/*.purs"
@nixpkgs-fmt ${nix-sources}
@prettier -w ${js-sources}
@make check-format
check-format:
@purs-tidy check "src/**/*.purs"
@purs-tidy check "test/**/*.purs"
@nixpkgs-fmt --check ${nix-sources}
@prettier --log-level warn -c ${js-sources}
@eslint --quiet ${js-sources} --parser-options 'sourceType: module'
ci-actions:
nix build -L .#checks.x86_64-linux.formatting-check
nix build -L .#checks.x86_64-linux.tests
node2nix:
cd nix/ && nix run nixpkgs#node2nix -- --development --lock ../package-lock.json -i ../package.json
rm nix/default.nix