From 7f2840c32fa76ea6a259e93f3f9303adcf9520f5 Mon Sep 17 00:00:00 2001 From: karl <2557075675@qq.com> Date: Wed, 20 Mar 2024 11:26:41 +0800 Subject: [PATCH] feat: add the manifest to root content --- manifest.json | 11 +++++++++++ vite.config.ts | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 manifest.json diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..5e38a3b --- /dev/null +++ b/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "univer", + "name": "Univer Doc and Sheet", + "version": "0.0.3", + "minAppVersion": "0.15.0", + "description": "Create doc and sheet base on Univer in Obsidian.", + "author": "Univer karl gjsss", + "authorUrl": "https://github.com/karlsbeard/obsidian-univer", + "fundingUrl": "https://opencollective.com/univer", + "isDesktopOnly": false +} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 761f43b..0c3df98 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,5 +1,5 @@ -import { rename, writeFile } from 'node:fs/promises' -import { resolve } from 'node:path' +import { rename, writeFile, copyFile } from 'node:fs/promises' +import { join, resolve } from 'node:path' import process from 'node:process' import { defineConfig } from 'vite' import builtins from 'builtin-modules' @@ -27,6 +27,7 @@ function generate(isDev?: boolean) { fundingUrl: 'https://opencollective.com/univer', isDesktopOnly: false, })) + await copyFile(resolve(buildDir, 'manifest.json'), join(process.cwd(), 'manifest.json')) if (isDev) await writeFile(resolve(buildDir, '.hotreload'), '') rename(resolve(buildDir, 'style.css'), resolve(buildDir, 'styles.css'))