add version display in UI sidebar + version bump rules
- VERSION file at repo root (0.3.0) - vite.config.ts reads VERSION at build time, injects __OIKOS_VERSION__ - App.svelte shows version in sidebar tooltip + subtle text below logo - AGENTS.md §9: every commit to main MUST bump VERSION (patch=bugfix, minor=new features, major=breaking changes)
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
import { readFileSync } from 'fs'
|
||||
|
||||
const version = readFileSync('../VERSION', 'utf-8').trim()
|
||||
|
||||
// Injects OIKOS_API_TOKEN into proxied /api requests in dev — the API no
|
||||
// longer has a dev-open bypass (plans/2026-07-12-wails-desktop-app.md 0.4),
|
||||
@@ -21,6 +24,9 @@ function authProxy(target: string, rewrite?: (path: string) => string) {
|
||||
export default defineConfig({
|
||||
plugins: [tailwindcss(), svelte()],
|
||||
base: '/',
|
||||
define: {
|
||||
__OIKOS_VERSION__: JSON.stringify(`v${version}`),
|
||||
},
|
||||
resolve: {
|
||||
alias: { $lib: '/src/lib' }
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user