Files
frontend-svelte/template/{{ part_dir }}/Makefile.jinja
T

40 lines
849 B
Makefile

COMPOSE := docker compose{% if layout == 'part' %} --project-directory ..{% endif %}
{% if layout == 'root' %}SERVICES := $(COMPOSE) --profile services
EXTERNAL := $(COMPOSE) --profile external
{% endif %}
.PHONY: {% if layout == 'root' %}env external recreate rebuild restart logs down {% endif %}fmt check build dev
fmt:
bun run fix
check:
bun run check
bun run lint
build:
{% if serve == 'api' %} $(COMPOSE) run --rm frontend-dev sh -c "bun install && bun run build"
{% else %} $(COMPOSE) build frontend
{% endif %}
dev:
bun run dev
{% if layout == 'root' %}
env:
@test -f .env || cp .env.example .env
external:
$(EXTERNAL) up -d
recreate: external
$(SERVICES) up -d --force-recreate
rebuild: build recreate
restart:
$(SERVICES) restart
logs:
$(SERVICES) logs -f --tail=100
down:
$(EXTERNAL) --profile services down
{% endif %}