Release RuneStone 0.1.4 with installable plugins and settings
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { build } from "vite";
|
||||
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
||||
import { copyFile, mkdir } from "node:fs/promises";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const root = fileURLToPath(new URL("../", import.meta.url));
|
||||
for (const name of ["terminal", "table-formulas"]) {
|
||||
const source = new URL(`../plugins/${name}/`, import.meta.url);
|
||||
const output = new URL(`../plugin-packages/${name}/`, import.meta.url);
|
||||
await build({
|
||||
configFile: false,
|
||||
root,
|
||||
plugins: [svelte({ configFile: false, compilerOptions: { dev: false } })],
|
||||
resolve: { alias: { $lib: fileURLToPath(new URL("../src/lib/", import.meta.url)) }, conditions: ["browser"] },
|
||||
build: {
|
||||
outDir: fileURLToPath(output), emptyOutDir: true,
|
||||
lib: { entry: fileURLToPath(new URL("index.ts", source)), formats: ["es"], fileName: () => "main.js", cssFileName: "style" },
|
||||
rolldownOptions: { output: { codeSplitting: false } },
|
||||
},
|
||||
});
|
||||
await mkdir(output, { recursive: true });
|
||||
await copyFile(new URL("plugin.json", source), new URL("plugin.json", output));
|
||||
}
|
||||
Reference in New Issue
Block a user