mirror of
https://github.com/chenhg5/cc-connect.git
synced 2026-07-08 07:51:12 +08:00
Replace the npm-based install/upgrade workflow with compile-time embedding. The web/dist/ directory is now embedded directly into the binary using go:embed and registered through core's plugin registry pattern (web/embed.go → core.RegisterWebAssets). - Add web/embed.go (go:build !no_web) and web/embed_stub.go - Add core/web_assets.go as the embedded FS registry - Add cmd/cc-connect/plugin_web.go to import the web package - Rewrite management.go static serving to use io/fs instead of disk - Simplify /web command to setup + status (remove install/upgrade/uninstall) - Clean up web_manager.go (remove npm logic, keep GenerateToken) - Update Makefile with web build target and NO_WEB/build-noweb support - Remove .npmignore and npm publishing fields from package.json Binary size impact: ~1MB (16M → 17M). Use `no_web` tag to exclude. Made-with: Cursor
6 lines
79 B
Go
6 lines
79 B
Go
//go:build !no_web
|
|
|
|
package main
|
|
|
|
import _ "github.com/chenhg5/cc-connect/web"
|