vesan_obsidian-table-beauti.../esbuild.config.mjs
Vesa Vänskä 2503c08863
feat: Obsidian plugin to convert box-drawing tables to Markdown
Parses ASCII (+/-/|) and Unicode (┌─┬─┐│├┼┤└┴┘) table formats
from CLI tool output and converts them to properly formatted
Markdown pipe tables. Identifier-like cell values are auto-wrapped
in backticks.

Available via right-click context menu and command palette.
2026-04-26 19:16:31 +03:00

24 lines
502 B
JavaScript

import esbuild from "esbuild";
import process from "process";
const production = process.argv[2] === "production";
const context = await esbuild.context({
entryPoints: ["src/main.ts"],
bundle: true,
external: ["obsidian"],
format: "cjs",
target: "es2018",
logLevel: "info",
sourcemap: production ? false : "inline",
treeShaking: true,
outfile: "main.js",
minify: production,
});
if (production) {
await context.rebuild();
process.exit(0);
} else {
await context.watch();
}