SHELL := /bin/sh
WEB := web

.PHONY: run setup build

run: setup
	cd $(WEB) && npm run dev

setup: $(WEB)/.env $(WEB)/node_modules/.installed

$(WEB)/.env: $(WEB)/.env.example
	cp $< $@
	@echo "Created $@. Fill in API credentials to enable integrations."

$(WEB)/node_modules/.installed: $(WEB)/package-lock.json
	cd $(WEB) && npm ci
	@touch $@

build: setup
	cd $(WEB) && npm run build
