-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
93 lines (78 loc) · 3.08 KB
/
Makefile
File metadata and controls
93 lines (78 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Human++ Color Scheme
# Makefile for common operations
#
# The core invariant: palette.toml is the single source of truth.
# Everything in dist/ and site/ is generated — do not edit by hand.
.PHONY: all build site dist preview colortest apply apply-dry analyze propose derive clean check help
# Default target
all: build
# Build all theme files from palette.toml
build:
@python3 tools/build.py
# Build only the site (fast iteration for web)
site:
@python3 -c "from tools.build import parse_palette, generate_palette_json, generate_site; c,m = parse_palette(); generate_palette_json(c,m); generate_site(c,m)"
# Build only dist/ outputs (no site)
dist:
@python3 -c "from tools.build import *; c,m = parse_palette(); generate_ghostty(c,m); generate_sketchybar(c,m); generate_borders(c,m); generate_skhd(c,m); generate_colortest(c,m); generate_base24_yaml(c,m); update_vscode_theme(c,m)"
# Preview the palette in terminal
preview:
@./scripts/preview.sh
# Display color test (terminal ANSI mapping)
colortest:
@./dist/scripts/colortest.sh
# Apply theme to installed applications
apply:
@./scripts/apply.sh
# Apply theme (dry run - show what would happen)
apply-dry:
@./scripts/apply.sh --dry-run
# Analyze palette in OKLCH color space
analyze:
@python3 tools/analyze.py
# Generate palette improvement proposals
propose:
@python3 tools/propose.py
# Derive quiet accents from loud accents
derive:
@python3 tools/derive_base24.py palette.toml
# Clean generated files (keeps source files)
clean:
@echo "Cleaning generated files..."
@rm -rf dist/ site/data/ site/index.html
@echo "Done."
# CI check: validate palette and analyze
check:
@echo "Validating palette.toml..."
@python3 -c "from tools.lib.palette import load_palette, validate_palette; \
from pathlib import Path; \
c, m = load_palette(Path('palette.toml')); \
errors = validate_palette(c); \
exit(1) if errors else print(' ✓ palette.toml is valid')"
@echo "Building outputs..."
@make build > /dev/null
@echo " ✓ Build successful"
@echo "Running analysis..."
@python3 tools/analyze.py > /dev/null 2>&1 && echo " ✓ Analysis passed" || echo " ! Analysis has warnings (non-blocking)"
@echo ""
@echo "✓ All checks passed"
# Help
help:
@echo "Human++ Color Scheme"
@echo ""
@echo "Core invariant: palette.toml is the single source of truth."
@echo "Everything in dist/ and site/ is generated."
@echo ""
@echo "Targets:"
@echo " make build - Build all theme files from palette.toml"
@echo " make site - Build only site/ (fast iteration)"
@echo " make dist - Build only dist/ outputs"
@echo " make preview - Preview palette in terminal (true color)"
@echo " make colortest - Display terminal ANSI color mapping"
@echo " make apply - Apply theme to installed applications"
@echo " make apply-dry - Show what apply would do (no changes)"
@echo " make analyze - Analyze palette in OKLCH color space"
@echo " make check - Build and verify no uncommitted changes (CI)"
@echo " make clean - Clean generated files"
@echo ""
@echo "Do not edit dist/ or site/ by hand — change palette.toml and rebuild."