-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (40 loc) · 1.38 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.PHONY: help clean test 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
PACKAGE_NAME = "sappio"
help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
clean: clean-test clean-dist ## remove all test coverage
clean-test: # remove test and coverage artifacts
rm -fr coverage/
clean-dist: # remove dist artifacts
rm -fr dist/
init: clean ## Initializes the environment with hooks install build and audit fix
npm run init
start: clean ## Starts an application with nodemon
npm start
update: clean ## Updates dependencies to latest and commit-push changes
npm run update
list: clean ## Lists packages used on pattern `package_name:num_occurrences:is_used`
npm run list
uninstall: clean ## Uninstalls the packages
if [ -f .npm_clean ]; then xargs -I {} npm uninstall {} < .npm_clean; else echo ".npm_clean file not found."; fi
test: clean-test ## Runs tests with jest
npm run test
watch: clean-test ## Runs tests on watchdog mode
npm run test:watch
deploy: ## Runs docker up
docker-compose up --build
lint: clean ## Performs inplace lint fixes
npm run format
install: clean ## Install the packages
npm install --legacy-peer-deps