diff --git a/.gitignore b/.gitignore index 7226093..2dbd0d6 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ coverage.html ui/node_modules/ ui/dist/ ui/.vite/ +ui/package.json docs/node_modules/ docs/dist/ *.log diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 5f28d54..0eeae12 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -8,7 +8,8 @@ project_name: claude-mnemonic before: hooks: - go mod tidy - # Build Vue dashboard and embed in binary + # Generate versioned package.json from template and build Vue dashboard + - bash -c "sed 's/{{ .Version }}/{{ .Version }}/g' ui/package.json.tpl > ui/package.json" - bash -c "cd ui && npm ci --silent && npm run build" - bash -c "rm -rf internal/worker/static && mkdir -p internal/worker/static && cp -r ui/dist/* internal/worker/static/" diff --git a/Makefile b/Makefile index f8a7cb0..f730f4c 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,7 @@ build: dashboard worker hooks mcp # Build Vue dashboard dashboard: @echo "Building Vue dashboard..." + @sed 's/{{ .Version }}/$(VERSION)/g' ui/package.json.tpl > ui/package.json @cd ui && npm install --silent && npm run build @rm -rf internal/worker/static @mkdir -p internal/worker/static diff --git a/ui/package-lock.json b/ui/package-lock.json index a4a630c..03c65bb 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "claude-mnemonic-dashboard", - "version": "1.0.0", + "version": "v0.6.1-3-gd68a700-dirty", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "claude-mnemonic-dashboard", - "version": "1.0.0", + "version": "v0.6.1-3-gd68a700-dirty", "dependencies": { "vue": "^3.5.13" }, diff --git a/ui/package.json b/ui/package.json index 52e3eef..f51d0c6 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "claude-mnemonic-dashboard", - "version": "1.0.0", + "version": "v0.6.1-3-gd68a700-dirty", "private": true, "type": "module", "scripts": { diff --git a/ui/package.json.tpl b/ui/package.json.tpl new file mode 100644 index 0000000..a9520b8 --- /dev/null +++ b/ui/package.json.tpl @@ -0,0 +1,26 @@ +{ + "name": "claude-mnemonic-dashboard", + "version": "{{ .Version }}", + "private": true, + "type": "module", + "scripts": { + "dev": "vite", + "build": "vue-tsc -b && vite build", + "preview": "vite preview", + "type-check": "vue-tsc --noEmit" + }, + "dependencies": { + "vue": "^3.5.13" + }, + "devDependencies": { + "@fortawesome/fontawesome-free": "^6.7.2", + "@types/node": "^22.10.2", + "@vitejs/plugin-vue": "^5.2.1", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.49", + "tailwindcss": "^3.4.17", + "typescript": "~5.7.2", + "vite": "^6.0.5", + "vue-tsc": "^2.2.0" + } +}