Generate extended manifest.json on build

This commit is contained in:
Aine 2024-10-30 17:58:33 +02:00
parent 61366b3792
commit fa79fecc9d
No known key found for this signature in database
GPG key ID: 34969C908CCA2804
3 changed files with 29 additions and 19 deletions

View file

@ -1,15 +0,0 @@
{
"short_name": "Synapse Admin",
"name": "Synapse Admin",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

View file

@ -8,10 +8,35 @@ export default defineConfig({
plugins: [
react(),
vitePluginVersionMark({
name: "Synapse Admin",
command: "git describe --tags || git rev-parse --short HEAD",
ifMeta: true,
ifLog: true,
ifMeta: false,
ifLog: false,
ifGlobal: true,
outputFile: (version) => ({
path: "manifest.json",
content: JSON.stringify({
name: "Synapse Admin",
version: version,
description: "Synapse Admin is an admin console for synapse Matrix homeserver with additional features.",
categories: ["productivity", "utilities"],
orientation: "landscape",
icons: [{
src: "favicon.ico",
sizes: "32x32",
type: "image/x-icon"
},{
src: "images/logo.webp",
sizes: "512x512",
type: "image/webp",
purpose: "any maskable"
}],
start_url: ".",
display: "standalone",
theme_color: "#000000",
background_color: "#ffffff"
}),
}),
}),
],
});

View file

@ -4643,7 +4643,7 @@ ra-core@^4.11.2, ra-core@^4.16.2:
react-is "^17.0.2"
react-query "^3.32.1"
ra-core@^5.3.0, ra-core@^5.3.1:
ra-core@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/ra-core/-/ra-core-5.3.1.tgz#38773ae1cda386064010fc2774c204ccaf6bc325"
integrity sha512-1q/h71iOco6kA9kkGNEmChuw+JgUTr+Y6MLfb/N0VcF75xX+v5SjoNMgHee/Jtn6uObOVeWdhAhIJ/bFwHR5sg==
@ -4667,7 +4667,7 @@ ra-i18n-polyglot@^5.3.0, ra-i18n-polyglot@^5.3.1:
node-polyglot "^2.2.2"
ra-core "^5.3.1"
ra-language-english@^5.3.0, ra-language-english@^5.3.1:
ra-language-english@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/ra-language-english/-/ra-language-english-5.3.1.tgz#823d25cbbf66ae9ba4098e087ae21110f4ffb030"
integrity sha512-ttEVhRI06VPA0MEFmCkxQNFa3C4ztGHG14vRnfRtpQ3qSF996genzoYCW/AdkI/JzskHU1zAw5o73qezSdqCuA==