chore: scaffold obsidian-jekyll-publish

Co-Authored-By: Claude
This commit is contained in:
2026-06-19 01:41:57 +00:00
parent 530a897f18
commit b321633421
8 changed files with 2409 additions and 0 deletions

23
esbuild.config.mjs Normal file
View File

@@ -0,0 +1,23 @@
import esbuild from "esbuild";
import process from "process";
import builtins from "builtin-modules";
import { copyFileSync, mkdirSync } from "fs";
const prod = process.argv[2] === "production";
mkdirSync("dist", { recursive: true });
for (const f of ["manifest.json", "styles.css"]) copyFileSync(f, `dist/${f}`);
const ctx = await esbuild.context({
entryPoints: ["src/main.ts"],
bundle: true,
external: ["obsidian", "electron", ...builtins],
format: "cjs",
target: "es2020",
logLevel: "info",
sourcemap: prod ? false : "inline",
treeShaking: true,
outfile: "dist/main.js",
platform: "node",
});
if (prod) { await ctx.rebuild(); process.exit(0); }
else { await ctx.watch(); }