-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (31 loc) · 1.05 KB
/
Copy pathMakefile
File metadata and controls
38 lines (31 loc) · 1.05 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
.PHONY: dev build preview verify clean help
# Default target
all: dev
# Start development server
dev:
npm run dev
# Run production build (TypeScript check + Vite build)
build:
npm run build
# Preview the production build locally (using /dist)
preview:
npm run preview
# Build and then immediately start preview server
# Use this to verify everything is OK before pushing to Cloudflare
verify: clean build
@echo "\n🚀 Build complete. Starting local preview server..."
@echo "Check the UI for missing icons, styles, or JS errors.\n"
npm run preview
# Remove build artifacts
clean:
rm -rf dist
rm -rf node_modules/.vite
# Help command to list all available tools
help:
@echo "WebSonic Automation & Build Tools"
@echo "------------------------------------------"
@echo "make dev - Start Vite development server"
@echo "make build - Run production build (TSC + Vite)"
@echo "make preview - Preview existing build from /dist"
@echo "make verify - BUILD + PREVIEW (Recommended before deploy!)"
@echo "make clean - Remove /dist and Vite cache"