-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (29 loc) · 879 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
33
34
35
36
37
38
39
40
41
42
.PHONY: help clean test test-watch lint coverage install
.DEFAULT_GOAL := help
define PRINT_HELP_PYSCRIPT
import re, sys
regex_pattern = r'^([a-zA-Z_-]+):.*?## (.*)$$'
for line in sys.stdin:
match = re.match(regex_pattern, line)
if match:
target, help = match.groups()
print("%-20s %s" % (target, help))
endef
export PRINT_HELP_PYSCRIPT
help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
clean: clean-test ## remove all unnecessary artifacts
clean-test: ## remove test and coverage artifacts
rm -fr coverage/
test: ## run tests with jest
npm run test
test-watch: ## run tests on watchdog mode
npm run test:watch
coverage: ## run tests on watchdog mode
npm run test:ci
lint: clean ## perform inplace lint fixes
npm run format
install: clean ## install the packages
npm install
publish: clean ## build source and publish package
npm run release