build(make): migrate from typescript frontend to svelte gui build system
- commit
- bc8e6fa1f68d216ecbed4647849be73adf899d10
- author
- bamen · · 2025-09-15 05:21 UTC
- parent
- 54fb6a9
- signature
- unsigned
2 files · +6 -5
M .gitignore +1 -0
| @@ -62,6 +62,7 @@ config.local.* | |||
| 62 | 62 | tmp/go-cache/ | |
| 63 | 63 | tmp/go-mod/ | |
| 64 | 64 | tmp/ | |
| 65 | + | assets/gui | |
| 65 | 66 | ||
| 66 | 67 | # Node/TypeScript related | |
| 67 | 68 | node_modules/ | |
| @@ -62,6 +62,7 @@ config.local.* | |||||
| 62 | tmp/go-cache/ | 62 | tmp/go-cache/ | ||
| 63 | tmp/go-mod/ | 63 | tmp/go-mod/ | ||
| 64 | tmp/ | 64 | tmp/ | ||
| 65 | + | assets/gui | |||
| 65 | 66 | ||||
| 66 | # Node/TypeScript related | 67 | # Node/TypeScript related | ||
| 67 | node_modules/ | 68 | node_modules/ | ||
M Makefile +5 -5
| @@ -42,10 +42,10 @@ build: build-frontend ## Build the application with GUI (frontend assets, then G | |||
| 42 | 42 | $(GOENV) CGO_ENABLED=1 go build -p $(NPROCS) $(LDFLAGS) -tags=webkit_cgo -o $(DIST_DIR)/$(BINARY_NAME) $(MAIN_PATH) | |
| 43 | 43 | @echo "✅ Build successful! Binary: $(DIST_DIR)/$(BINARY_NAME)" | |
| 44 | 44 | ||
| 45 | - | build-frontend: ## Build TypeScript frontend | |
| 46 | - | @echo "Building TypeScript frontend..." | |
| 47 | - | @cd frontend && npm install --silent && npm run build | |
| 48 | - | @echo "Frontend build complete" | |
| 45 | + | build-frontend: ## Build Svelte GUI with Tailwind CSS | |
| 46 | + | @echo "Building Svelte GUI with Tailwind CSS..." | |
| 47 | + | @cd gui && npm install --silent && npm run build | |
| 48 | + | @echo "GUI build complete" | |
| 49 | 49 | ||
| 50 | 50 | build-no-gui: build-frontend ## Build binary without GUI (CGO disabled, CLI-only functionality) | |
| 51 | 51 | @echo "Building $(BINARY_NAME) $(VERSION) (CLI-only, no GUI) using $(NPROCS) cores..." | |
| @@ -116,7 +116,7 @@ clean: ## Clean build artifacts | |||
| 116 | 116 | @echo "Cleaning build artifacts..." | |
| 117 | 117 | rm -rf $(DIST_DIR) | |
| 118 | 118 | rm -f $(BINARY_NAME) # Remove any old binaries in root | |
| 119 | - | rm -rf frontend/dist frontend/node_modules | |
| 119 | + | rm -rf gui/dist gui/node_modules | |
| 120 | 120 | go clean -cache | |
| 121 | 121 | go clean -testcache | |
| 122 | 122 | ||
| @@ -42,10 +42,10 @@ build: build-frontend ## Build the application with GUI (frontend assets, then G | |||||
| 42 | $(GOENV) CGO_ENABLED=1 go build -p $(NPROCS) $(LDFLAGS) -tags=webkit_cgo -o $(DIST_DIR)/$(BINARY_NAME) $(MAIN_PATH) | 42 | $(GOENV) CGO_ENABLED=1 go build -p $(NPROCS) $(LDFLAGS) -tags=webkit_cgo -o $(DIST_DIR)/$(BINARY_NAME) $(MAIN_PATH) | ||
| 43 | @echo "✅ Build successful! Binary: $(DIST_DIR)/$(BINARY_NAME)" | 43 | @echo "✅ Build successful! Binary: $(DIST_DIR)/$(BINARY_NAME)" | ||
| 44 | 44 | ||||
| 45 | - | build-frontend: ## Build TypeScript frontend | 45 | + | build-frontend: ## Build Svelte GUI with Tailwind CSS |
| 46 | - | @echo "Building TypeScript frontend..." | 46 | + | @echo "Building Svelte GUI with Tailwind CSS..." |
| 47 | - | @cd frontend && npm install --silent && npm run build | 47 | + | @cd gui && npm install --silent && npm run build |
| 48 | - | @echo "Frontend build complete" | 48 | + | @echo "GUI build complete" |
| 49 | 49 | ||||
| 50 | build-no-gui: build-frontend ## Build binary without GUI (CGO disabled, CLI-only functionality) | 50 | build-no-gui: build-frontend ## Build binary without GUI (CGO disabled, CLI-only functionality) | ||
| 51 | @echo "Building $(BINARY_NAME) $(VERSION) (CLI-only, no GUI) using $(NPROCS) cores..." | 51 | @echo "Building $(BINARY_NAME) $(VERSION) (CLI-only, no GUI) using $(NPROCS) cores..." | ||
| @@ -116,7 +116,7 @@ clean: ## Clean build artifacts | |||||
| 116 | @echo "Cleaning build artifacts..." | 116 | @echo "Cleaning build artifacts..." | ||
| 117 | rm -rf $(DIST_DIR) | 117 | rm -rf $(DIST_DIR) | ||
| 118 | rm -f $(BINARY_NAME) # Remove any old binaries in root | 118 | rm -f $(BINARY_NAME) # Remove any old binaries in root | ||
| 119 | - | rm -rf frontend/dist frontend/node_modules | 119 | + | rm -rf gui/dist gui/node_modules |
| 120 | go clean -cache | 120 | go clean -cache | ||
| 121 | go clean -testcache | 121 | go clean -testcache | ||
| 122 | 122 | ||||