First commit for bicorder-app

This commit is contained in:
Nathan Schneider
2025-11-25 13:20:21 -05:00
parent 3a55d3dbb9
commit b541f6049e
24 changed files with 8883 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { VitePWA } from 'vite-plugin-pwa'
import fs from 'fs'
import path from 'path'
// Read bicorder.json at build time
const bicorderData = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '../bicorder.json'), 'utf-8')
)
export default defineConfig({
base: './',
plugins: [
svelte(),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['favicon.ico'],
manifest: {
name: 'Protocol Bicorder',
short_name: 'Bicorder',
description: 'A diagnostic tool for the study of protocols',
theme_color: '#ffffff',
background_color: '#ffffff',
display: 'standalone',
icons: [
{
src: '/icon.svg',
sizes: 'any',
type: 'image/svg+xml',
purpose: 'any'
}
]
},
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,json}']
}
})
],
define: {
'__BICORDER_DATA__': JSON.stringify(bicorderData)
}
})