Skip to content

Commit 9cc24f9

Browse files
authored
Merge pull request #32 from yajamon/catchup-template
Catchup template
2 parents bf0080f + ebcc328 commit 9cc24f9

File tree

8 files changed

+2328
-1821
lines changed

8 files changed

+2328
-1821
lines changed

.eslintignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
npm node_modules
2-
build
1+
node_modules/
2+
3+
main.js

esbuild.config.mjs

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,38 @@ if you want to view the source visit the plugins github repository
1111

1212
const prod = (process.argv[2] === 'production');
1313

14-
esbuild.build({
14+
const context = await esbuild.context({
1515
banner: {
1616
js: banner,
1717
},
1818
entryPoints: ['src/main.ts'],
1919
bundle: true,
20-
external: ['obsidian', 'electron', ...builtins],
20+
external: [
21+
"obsidian",
22+
"electron",
23+
"@codemirror/autocomplete",
24+
"@codemirror/collab",
25+
"@codemirror/commands",
26+
"@codemirror/language",
27+
"@codemirror/lint",
28+
"@codemirror/search",
29+
"@codemirror/state",
30+
"@codemirror/view",
31+
"@lezer/common",
32+
"@lezer/highlight",
33+
"@lezer/lr",
34+
...builtins],
2135
format: 'cjs',
22-
watch: !prod,
23-
target: 'es2016',
36+
target: "es2018",
2437
logLevel: "info",
2538
sourcemap: prod ? false : 'inline',
2639
treeShaking: true,
2740
outfile: 'main.js',
28-
}).catch(() => process.exit(1));
41+
});
42+
43+
if (prod) {
44+
await context.rebuild();
45+
process.exit(0);
46+
} else {
47+
await context.watch();
48+
}

manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"id": "obsidian-command-alias-plugin",
33
"name": "Command Alias",
4-
"version": "2.0.0",
5-
"minAppVersion": "0.9.12",
4+
"version": "2.0.1",
5+
"minAppVersion": "0.15.0",
66
"description": "This plugin gives aliases to Obsidian commands.",
77
"author": "yajamon<[email protected]>",
88
"authorUrl": "https://github.com/yajamon/obsidian-command-alias-plugin",

0 commit comments

Comments
 (0)