-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
195 lines (162 loc) Β· 7.33 KB
/
Makefile
File metadata and controls
195 lines (162 loc) Β· 7.33 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
.PHONY: all build build-all core dev-configs docs docs-mcp helpers inversion boot \
help install clean setup-hooks \
lint lint-all lint-packages lint-examples \
lint-dev-configs lint-inversion lint-helpers lint-boot lint-core lint-docs-mcp \
update update-all update-core update-dev-configs update-docs-mcp update-helpers update-inversion update-boot
DEFAULT_GOAL := help
all: build
# ============================================================================
# INSTALL & CLEAN
# ============================================================================
install:
@echo "π₯ Installing dependencies (with force-update via postinstall)..."
@bun install
@echo "β
Install completed."
clean:
@echo "π§Ή Cleaning all packages..."
@bun run --filter "*" clean
# ============================================================================
# GIT HOOKS
# ============================================================================
setup-hooks:
@echo "π§ Setting up git hooks..."
@git config core.hooksPath .githooks
@echo "β
Git hooks configured to use .githooks directory."
# ============================================================================
# BUILD TARGETS
# ============================================================================
build: build-all
build-all: core docs docs-mcp
@echo "π All packages rebuilt successfully."
# Granular build targets for individual packages
# Dependency chain: dev-configs β inversion β helpers β boot β core
# Note: Using --filter directly to avoid triggering prerebuild scripts (Make handles deps)
dev-configs:
@echo "π¦ Rebuilding @venizia/dev-configs..."
@bun run --filter "@venizia/dev-configs" rebuild
inversion: dev-configs
@echo "π¦ Rebuilding @venizia/ignis-inversion..."
@bun run --filter "@venizia/ignis-inversion" rebuild
helpers: inversion
@echo "π¦ Rebuilding @venizia/ignis-helpers..."
@bun run --filter "@venizia/ignis-helpers" rebuild
boot: helpers
@echo "π¦ Rebuilding @venizia/ignis-boot..."
@bun run --filter "@venizia/ignis-boot" rebuild
core: boot
@echo "π¦ Rebuilding @venizia/ignis (core)..."
@bun run --filter "@venizia/ignis" rebuild
docs:
@echo "π¦ Rebuilding wiki (VitePress)..."
@bun run --filter "@venizia/ignis-docs" docs:build
docs-mcp: dev-configs
@echo "π¦ Rebuilding @venizia/ignis-docs (MCP Server)..."
@bun run --filter "@venizia/ignis-docs" mcp:rebuild
# ============================================================================
# FORCE UPDATE TARGETS (fetch latest from NPM registry)
# Note: 'bun install' triggers postinstall which runs force-update automatically
# ============================================================================
update: install
update-all: install
update-core:
@echo "π Force updating @venizia/ignis (core)..."
@bun run --filter "@venizia/ignis" force-update
update-dev-configs:
@echo "π Force updating @venizia/dev-configs..."
@bun run --filter "@venizia/dev-configs" force-update
update-docs-mcp:
@echo "π Force updating @venizia/ignis-docs (MCP Server)..."
@bun run --filter "@venizia/ignis-docs" force-update
update-helpers:
@echo "π Force updating @venizia/ignis-helpers..."
@bun run --filter "@venizia/ignis-helpers" force-update
update-inversion:
@echo "π Force updating @venizia/ignis-inversion..."
@bun run --filter "@venizia/ignis-inversion" force-update
update-boot:
@echo "π Force updating @venizia/ignis-boot..."
@bun run --filter "@venizia/ignis-boot" force-update
# ============================================================================
# LINT TARGETS
# ============================================================================
lint: lint-packages
@echo "β
Linting completed."
lint-all: lint-packages lint-examples
@echo "β
All linting completed."
lint-packages:
@echo "π Linting all packages..."
@bun run --filter "./packages/*" lint
lint-examples:
@echo "π Linting all examples..."
@bun run --filter "./examples/*" lint
lint-dev-configs:
@echo "π Linting @venizia/dev-configs..."
@bun run --filter "@venizia/dev-configs" lint
lint-inversion:
@echo "π Linting @venizia/ignis-inversion..."
@bun run --filter "@venizia/ignis-inversion" lint
lint-helpers:
@echo "π Linting @venizia/ignis-helpers..."
@bun run --filter "@venizia/ignis-helpers" lint
lint-boot:
@echo "π Linting @venizia/ignis-boot..."
@bun run --filter "@venizia/ignis-boot" lint
lint-core:
@echo "π Linting @venizia/ignis (core)..."
@bun run --filter "@venizia/ignis" lint
lint-docs-mcp:
@echo "π Linting @venizia/ignis-docs (MCP Server)..."
@bun run --filter "@venizia/ignis-docs" lint
# ============================================================================
# HELP
# ============================================================================
help:
@echo "Makefile for the @venizia/lib Monorepo"
@echo ""
@echo "Usage: make [target]"
@echo ""
@echo "Main Targets:"
@echo " all - Alias for 'build'."
@echo " build - Rebuilds all packages (alias for 'build-all')."
@echo " build-all - Rebuilds all packages in the correct order."
@echo " install - Install all dependencies with bun."
@echo " clean - Clean build artifacts from all packages."
@echo " setup-hooks - Configure git to use .githooks directory."
@echo ""
@echo "Force Update (fetch latest from NPM):"
@echo " update - Force update all packages from NPM registry."
@echo " update-all - Same as 'update'."
@echo " update-core - Force update @venizia/ignis (core) dependencies."
@echo " update-dev-configs- Force update @venizia/dev-configs dependencies."
@echo " update-docs-mcp - Force update @venizia/ignis-docs (MCP) dependencies."
@echo " update-helpers - Force update @venizia/ignis-helpers dependencies."
@echo " update-inversion - Force update @venizia/ignis-inversion dependencies."
@echo " update-boot - Force update @venizia/ignis-boot dependencies."
@echo ""
@echo "Individual Package Builds:"
@echo " core - Rebuilds @venizia/ignis (after its dependencies)."
@echo " boot - Rebuilds @venizia/ignis-boot (after its dependencies)."
@echo " dev-configs - Rebuilds @venizia/dev-configs."
@echo " docs - Rebuilds wiki (VitePress) for GitHub Pages."
@echo " docs-mcp - Rebuilds @venizia/ignis-docs (MCP Server) for NPM."
@echo " helpers - Rebuilds @venizia/ignis-helpers."
@echo " inversion - Rebuilds @venizia/ignis-inversion."
@echo ""
@echo "Linting:"
@echo " lint - Lint all packages (alias for lint-packages)."
@echo " lint-all - Lint all packages AND examples."
@echo " lint-packages - Lint packages/ directory only."
@echo " lint-examples - Lint examples/ directory only."
@echo " lint-dev-configs - Lint @venizia/dev-configs."
@echo " lint-inversion - Lint @venizia/ignis-inversion."
@echo " lint-helpers - Lint @venizia/ignis-helpers."
@echo " lint-boot - Lint @venizia/ignis-boot."
@echo " lint-core - Lint @venizia/ignis (core)."
@echo " lint-docs-mcp - Lint @venizia/ignis-docs (MCP Server)."
@echo ""
@echo "Other:"
@echo " help - Show this help message."
@echo ""
@echo "Development (use bun run directly):"
@echo " bun run docs:dev - Start documentation site in development mode."
@echo " bun run mcp:dev - Start MCP server in development mode."