Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@ import esbuild from "esbuild";
import process from "process";
import builtins from "builtin-modules";

const banner =
`/*
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 prod = (process.argv[2] === "production");
const prod = process.argv[2] === "production";

const context = await esbuild.context({
banner: {
js: banner,
},
entryPoints: ["main.ts"],
entryPoints: ["src/main.ts"],
bundle: true,
external: [
"obsidian",
Expand All @@ -31,7 +30,8 @@ const context = await esbuild.context({
"@lezer/common",
"@lezer/highlight",
"@lezer/lr",
...builtins],
...builtins,
],
format: "cjs",
target: "es2018",
logLevel: "info",
Expand All @@ -41,12 +41,12 @@ const context = await esbuild.context({
loader: {
".png": "dataurl",
".gif": "dataurl",
}
},
});

if (prod) {
await context.rebuild();
process.exit(0);
} else {
await context.watch();
}
}
313 changes: 0 additions & 313 deletions main.ts

This file was deleted.

Loading