- Dynamic miller column sizing with flexbox layout - Root column (160px), middle slices (48px), active column (flex) - Auto-scroll browser to rightmost column on navigation - Offline indicator UI and IndexedDB cache integration - /api/documents endpoint for client-side document caching - Breadcrumb navigation in document content area - FTS5 search with SQLite virtual table - Client-side Mermaid and KaTeX rendering via CDN - Deep sample content (advanced-topics/raft-deep-dive) - Border removal (only search button keeps radius) - Full viewport layout with proper borders between sidebar/content
55 lines
1.3 KiB
Makefile
55 lines
1.3 KiB
Makefile
SHELL := /bin/bash
|
|
GO := go
|
|
NPM := npm
|
|
SERVER_DIR := apps/server
|
|
WEB_DIR := apps/web
|
|
SERVER_BIN := $(SERVER_DIR)/bin/md-hub-secure
|
|
|
|
.PHONY: web-install web-build web-dev server-run server-build server-test docker-build ci fmt dev dev-web dev-server
|
|
|
|
web-install:
|
|
cd $(WEB_DIR) && $(NPM) install
|
|
|
|
web-build:
|
|
cd $(WEB_DIR) && $(NPM) run build
|
|
|
|
web-dev:
|
|
cd $(WEB_DIR) && $(NPM) run dev
|
|
|
|
server-run:
|
|
cd $(SERVER_DIR) && CGO_ENABLED=1 $(GO) run ./cmd/md-hub-secure
|
|
|
|
server-build:
|
|
mkdir -p $(SERVER_DIR)/bin
|
|
cd $(SERVER_DIR) && CGO_ENABLED=1 $(GO) build -trimpath -o bin/md-hub-secure ./cmd/md-hub-secure
|
|
|
|
server-test:
|
|
cd $(SERVER_DIR) && CGO_ENABLED=1 $(GO) test ./...
|
|
|
|
dev-server:
|
|
cd $(SERVER_DIR) && MD_HUB_DEV_VITE_URL=http://localhost:5173 air
|
|
|
|
dev-web:
|
|
cd $(WEB_DIR) && $(NPM) run dev
|
|
|
|
dev:
|
|
@echo "Starting dev servers..."
|
|
@echo " - Go server (with air live reload) on http://localhost:8080"
|
|
@echo " - Vite dev server on http://localhost:5173"
|
|
@echo ""
|
|
@echo "Access the app at http://localhost:8080/app/"
|
|
@echo ""
|
|
@trap 'kill %1 %2 2>/dev/null || true' EXIT; \
|
|
make dev-server & \
|
|
make dev-web & \
|
|
wait
|
|
|
|
docker-build:
|
|
docker build -t md-hub-secure:dev .
|
|
|
|
fmt:
|
|
cd $(SERVER_DIR) && $(GO) fmt ./...
|
|
cd $(WEB_DIR) && $(NPM) run format
|
|
|
|
ci: web-install web-build server-test server-build
|