Switched to Make commands for frontend ci
Some checks failed
continuous-integration/drone the build failed

This commit is contained in:
Jef Roosens 2021-05-18 15:55:36 +02:00
parent 84d135d5e3
commit ddd498e92b
Signed by: Jef Roosens
GPG key ID: B580B976584B5F30
4 changed files with 55 additions and 13 deletions

View file

@ -1,16 +1,18 @@
# =====CONFIG=====
PYTHON := python3
PYTHON := python3
# This can't contain spaces (I think)
VENV := .venv
VENV := .venv
# Minimum % coverage for tests to succeed
MIN_COV := 0
# Directory name for the frontend
WEB_DIR := web
# By default, just create the venv when needed
all: venv
# =====RECIPES=====
# =====BACKEND=====
## VENV
### Create the venv
$(VENV)/bin/activate: setup.py setup.cfg
@ -43,9 +45,9 @@ test: venv
## Cleaning
# Remove the venv
### Remove the venv
clean:
@ rm -rf '$(VENV)'
@ rm -rf '$(VENV)' '$(WEB_DIR)'/node_modules
.PHONY: clean
@ -53,3 +55,35 @@ clean:
### Run the Quart server
run: venv
@ '$(VENV)'/bin/python app
.PHONY: run
# =====BACKEND=====
## node_modules
### Install dependencies
$(WEB_DIR)/yarn.lock: $(WEB_DIR)/package.json
@ cd web && yarn install
# Convenient alias
lockfile: $(WEB_DIR)/yarn.lock
.PHONY: lockfile
## Formatting & linting
flint: lockfile
@ cd web && yarn run lint
.PHONY: flint
fformat: lockfile
@ cd web && yarn run format
.PHONY: fformat
## Testing
# TODO add testing command
## Building
fbuild: lockfile
@ cd web && yarn build
.PHONY: fbuild