mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 03:46:42 +02:00
feat(shared): add DevBuildBadge component and getBuildDefines() helper
- shared-vite-config: getBuildDefines() injects __BUILD_HASH__ and __BUILD_TIME__ as compile-time constants via Vite define - shared-ui: DevBuildBadge component shows git hash + build timestamp in a small fixed badge at bottom-right (click to expand) - Integrated into mukke-web for deployment verification Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
511b51e372
commit
822e75368a
6 changed files with 105 additions and 2 deletions
2
apps/mukke/apps/web/src/app.d.ts
vendored
Normal file
2
apps/mukke/apps/web/src/app.d.ts
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
declare const __BUILD_HASH__: string;
|
||||
declare const __BUILD_TIME__: string;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
import { goto } from '$app/navigation';
|
||||
import { page } from '$app/stores';
|
||||
import { onMount } from 'svelte';
|
||||
import { PillNavigation } from '@manacore/shared-ui';
|
||||
import { PillNavigation, DevBuildBadge } from '@manacore/shared-ui';
|
||||
import type { PillNavItem, PillDropdownItem } from '@manacore/shared-ui';
|
||||
import {
|
||||
SplitPaneContainer,
|
||||
|
|
@ -166,6 +166,7 @@
|
|||
<MiniPlayer />
|
||||
<FullPlayer />
|
||||
<QueuePanel />
|
||||
<DevBuildBadge commitHash={__BUILD_HASH__} buildTime={__BUILD_TIME__} />
|
||||
</div>
|
||||
</SplitPaneContainer>
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { defineConfig } from 'vite';
|
|||
import tailwindcss from '@tailwindcss/vite';
|
||||
import { SvelteKitPWA } from '@vite-pwa/sveltekit';
|
||||
import { createPWAConfig } from '@manacore/shared-pwa';
|
||||
import { MANACORE_SHARED_PACKAGES } from '@manacore/shared-vite-config';
|
||||
import { MANACORE_SHARED_PACKAGES, getBuildDefines } from '@manacore/shared-vite-config';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
|
|
@ -28,4 +28,7 @@ export default defineConfig({
|
|||
optimizeDeps: {
|
||||
exclude: [...MANACORE_SHARED_PACKAGES, '@mukke/shared'],
|
||||
},
|
||||
define: {
|
||||
...getBuildDefines(),
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue