mirror of
https://github.com/thdngan/permanent-ink.git
synced 2026-07-22 13:50:27 +00:00
30 lines
613 B
TypeScript
30 lines
613 B
TypeScript
const banner = `/*
|
|
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
if you want to view the source, please visit the github repository of this plugin
|
|
*/
|
|
`;
|
|
|
|
const result = await Bun.build({
|
|
entrypoints: ["./src/main.ts"],
|
|
outdir: "./build",
|
|
format: "cjs",
|
|
external: ["obsidian", "electron", "@codemirror/*", "@lezer/*"],
|
|
minify: true,
|
|
loader: {
|
|
".json": "file",
|
|
},
|
|
naming: {
|
|
asset: "[name].[ext]",
|
|
},
|
|
banner,
|
|
});
|
|
|
|
if (!result.success) {
|
|
console.error("Build failed");
|
|
for (const message of result.logs) {
|
|
// Bun will pretty print the message object
|
|
console.error(message);
|
|
}
|
|
}
|
|
|
|
export { result };
|