Added in a button for syncing

This commit is contained in:
2026-04-08 13:15:47 +01:00
parent 470a1c15b8
commit af07ca1174
8 changed files with 6202 additions and 111 deletions

View File

@@ -0,0 +1,25 @@
import { build } from "esbuild";
import { rmSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
rmSync(path.join(__dirname, "main.js"), { force: true });
rmSync(path.join(__dirname, "main.js.map"), { force: true });
await build({
entryPoints: [path.join(__dirname, "src", "main.ts")],
bundle: true,
outfile: path.join(__dirname, "main.js"),
format: "cjs",
platform: "browser",
target: "es2020",
sourcemap: "inline",
external: ["obsidian"],
logLevel: "info",
treeShaking: true,
banner: {
js: '/* Obsidian plugin bundle: generated by apps/obsidian-plugin/build.mjs */'
}
});