Added in a button for syncing
This commit is contained in:
25
apps/obsidian-plugin/build.mjs
Normal file
25
apps/obsidian-plugin/build.mjs
Normal 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 */'
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user