forked from lektor/lektor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (32 loc) · 804 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
all: build-js
.PHONY: build-js
build-js: frontend/node_modules
@echo "---> cleaning static files"
@rm -rf lektor/admin/static
@echo "---> building static files"
@cd frontend; npm run build
frontend/node_modules: frontend/package-lock.json
@echo "---> installing npm dependencies"
@cd frontend; npm install
@touch -m frontend/node_modules
# Run tests on Python files.
test-python:
@echo "---> running python tests"
tox -e py
# Run tests on the Frontend code.
test-js: frontend/node_modules
@echo "---> running javascript tests"
@cd frontend; npx tsc
@cd frontend; npm test
.PHONY: lint
# Lint code.
lint:
pre-commit run -a
tox -e lint
.PHONY: test
test: lint test-python test-js
.PHONY: test-all
# Run tests on all supported Python versions.
test-all: test-js
pre-commit run -a
tox