-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (22 loc) · 821 Bytes
/
Makefile
File metadata and controls
26 lines (22 loc) · 821 Bytes
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
PWD := $(shell pwd)
# list available targets
list:
@LC_ALL=C $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/(^|\n)# Files(\n|$$)/,/(^|\n)# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | grep -E -v -e '^[^[:alnum:]]' -e '^$@$$'
clean:
sh ./scripts/cleanup-repository.sh;
install:
# setup pnpm
# see: https://pnpm.io/installation#on-posix-systems
pnpm --help > /dev/null 2>&1 || curl -fsSL https://get.pnpm.io/install.sh | sh -;
pnpm self-update $(shell grep packageManager package.json | cut -d'"' -f4 | cut -d'@' -f2);
# setup node version
# see: https://pnpm.io/cli/runtime
pnpm runtime set node --global `cat .nvmrc`;
# install node modules
pnpm install --ignore-scripts;
pnpm build;
# setup husky
pnpm husky;
test:
@$(MAKE) install;
pnpm test;