Skip to content

Commit 52ebcec

Browse files
Release 2.0.4.
1 parent adcf00e commit 52ebcec

File tree

5 files changed

+281
-427
lines changed

5 files changed

+281
-427
lines changed

esbuild.config.mjs

Lines changed: 45 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,54 @@ import esbuild from "esbuild";
22
import process from "process";
33
import builtins from "builtin-modules";
44

5-
const banner =
6-
`/*
5+
const banner = `/*
76
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
87
if you want to view the source, please visit the github repository of this plugin
98
*/
109
`;
1110

12-
const prod = (process.argv[2] === "production");
11+
const prod = process.argv[2] === "production";
1312

14-
const context = await esbuild.context({
15-
banner: {
16-
js: banner,
17-
},
18-
entryPoints: ["src/main.ts"],
19-
bundle: true,
20-
platform: "node",
21-
external: [
22-
"obsidian",
23-
"electron",
24-
"@codemirror/autocomplete",
25-
"@codemirror/collab",
26-
"@codemirror/commands",
27-
"@codemirror/language",
28-
"@codemirror/lint",
29-
"@codemirror/search",
30-
"@codemirror/state",
31-
"@codemirror/view",
32-
"@lezer/common",
33-
"@lezer/highlight",
34-
"@lezer/lr",
35-
...builtins],
36-
format: "cjs",
37-
target: "es2018",
38-
logLevel: "info",
39-
sourcemap: prod ? false : "inline",
40-
treeShaking: true,
41-
outfile: "main.js",
42-
});
43-
44-
if (prod) {
45-
await context.rebuild();
46-
process.exit(0);
47-
} else {
48-
await context.watch();
49-
}
13+
esbuild
14+
.build({
15+
banner: {
16+
js: banner,
17+
},
18+
entryPoints: ["src/main.ts"],
19+
bundle: true,
20+
platform: "node",
21+
external: [
22+
"obsidian",
23+
"electron",
24+
"@codemirror/autocomplete",
25+
"@codemirror/closebrackets",
26+
"@codemirror/collab",
27+
"@codemirror/commands",
28+
"@codemirror/comment",
29+
"@codemirror/fold",
30+
"@codemirror/gutter",
31+
"@codemirror/highlight",
32+
"@codemirror/history",
33+
"@codemirror/language",
34+
"@codemirror/lint",
35+
"@codemirror/matchbrackets",
36+
"@codemirror/panel",
37+
"@codemirror/rangeset",
38+
"@codemirror/rectangular-selection",
39+
"@codemirror/search",
40+
"@codemirror/state",
41+
"@codemirror/stream-parser",
42+
"@codemirror/text",
43+
"@codemirror/tooltip",
44+
"@codemirror/view",
45+
...builtins,
46+
],
47+
format: "cjs",
48+
watch: !prod,
49+
target: "es6",
50+
logLevel: "info",
51+
sourcemap: prod ? false : "inline",
52+
treeShaking: true,
53+
outfile: "main.js",
54+
})
55+
.catch(() => process.exit(1));

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "obsidian-local-rest-api",
33
"name": "Local REST API",
4-
"version": "2.0.3",
4+
"version": "2.0.4",
55
"minAppVersion": "0.12.0",
66
"description": "Get, change or otherwise interact with your notes in Obsidian via a REST API.",
77
"author": "Adam Coddington",

0 commit comments

Comments
 (0)