mews.page/Makefile
randogoth 060d4e00fd refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders
validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
2026-10-13 12:29:23 +03:00

33 lines
1,020 B
Makefile

# Local build and checks. The real gate is `nix build .#site`, which runs the
# same steps in the sandbox and refuses to produce a non-conforming page.
SPEC_DESCRIPTION = The Mews Profile specification, version 0.1.
.PHONY: site test lint clean
site:
rm -rf build
mkdir -p build/spec build/dtd
cd site && uv run pelican content
cp site/output/index.html site/output/check.html build/
cp site/output/mews-0.1.css build/mews-0.1.css
cp spec/mews-0.1.css build/spec/mews-0.1.css
cp spec/mews-0.1.dtd spec/xhtml-mobile12.dtd build/dtd/
uv run --script quickstart/md2mews.py spec/SPEC.md -o build/spec/0.1.html \
--lang en --variant mews-cool --description "$(SPEC_DESCRIPTION)"
uv run mewslint --quiet build/index.html build/check.html \
build/spec/0.1.html
@echo "site built in build/"
test:
uv run --script spec/check_dtd.py
cd validator && uv run pytest -q
cd directory && uv run pytest -q
uv run pytest -q
lint:
uv run ruff check .
uv run ruff format --check .
clean:
rm -rf build site/output