| 1 |
all: build-js |
| 2 |
|
| 3 |
.PHONY: build-js |
| 4 |
build-js: frontend/node_modules |
| 5 |
@echo "---> building static files" |
| 6 |
@cd frontend; npm run webpack |
| 7 |
|
| 8 |
frontend/node_modules: frontend/package-lock.json |
| 9 |
@echo "---> installing npm dependencies" |
| 10 |
@cd frontend; npm install |
| 11 |
@touch -m frontend/node_modules |
| 12 |
|
| 13 |
|
| 14 |
test-python: |
| 15 |
@echo "---> running python tests" |
| 16 |
tox -e py |
| 17 |
|
| 18 |
|
| 19 |
test-js: frontend/node_modules |
| 20 |
@echo "---> running javascript tests" |
| 21 |
@cd frontend; npx tsc |
| 22 |
@cd frontend; npm test |
| 23 |
|
| 24 |
.PHONY: lint |
| 25 |
|
| 26 |
lint: |
| 27 |
pre-commit run -a |
| 28 |
tox -e lint |
| 29 |
|
| 30 |
.PHONY: test |
| 31 |
test: lint test-python test-js |
| 32 |
|
| 33 |
.PHONY: test-all |
| 34 |
|
| 35 |
test-all: test-js |
| 36 |
pre-commit run -a |
| 37 |
tox |
| 38 |
|
| 39 |
|
| 40 |
dist: build-js setup.cfg MANIFEST.in |
| 41 |
rm -r build dist |
| 42 |
python -m build |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
.PHONY: upload |
| 47 |
upload: dist |
| 48 |
twine upload dist/* |