anki/react/Makefile
Damien Elmes 82f0db7583 add a web UI proof of concept
See react/README
2020-01-06 14:28:07 +10:00

35 lines
594 B
Makefile

SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
.SUFFIXES:
$(shell mkdir -p .build)
.PHONY: all
all: run
.PHONY: run
run: build-tslib
tmux new -d -s anki-react "make run-pybackend"
tmux split-window "make run-react"
tmux attach
.PHONY: run-pybackend
run-pybackend:
../pyenv/bin/pip install bottle
../pyenv/bin/python pybackend.py
.PHONY: build-tslib
build-tslib:
(cd ../tslib && make build)
.PHONY: run-react
run-react: .build/deps
npm run start
.build/deps: package.json
npm i
@touch $@