Skip to content

Commit

Permalink
Merge pull request #32 from yajamon/catchup-template
Browse files Browse the repository at this point in the history
Catchup template
  • Loading branch information
yajamon authored Feb 28, 2023
2 parents bf0080f + ebcc328 commit 9cc24f9
Show file tree
Hide file tree
Showing 8 changed files with 2,328 additions and 1,821 deletions.
5 changes: 3 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
npm node_modules
build
node_modules/

main.js
30 changes: 25 additions & 5 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,38 @@ if you want to view the source visit the plugins github repository

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

esbuild.build({
const context = await esbuild.context({
banner: {
js: banner,
},
entryPoints: ['src/main.ts'],
bundle: true,
external: ['obsidian', 'electron', ...builtins],
external: [
"obsidian",
"electron",
"@codemirror/autocomplete",
"@codemirror/collab",
"@codemirror/commands",
"@codemirror/language",
"@codemirror/lint",
"@codemirror/search",
"@codemirror/state",
"@codemirror/view",
"@lezer/common",
"@lezer/highlight",
"@lezer/lr",
...builtins],
format: 'cjs',
watch: !prod,
target: 'es2016',
target: "es2018",
logLevel: "info",
sourcemap: prod ? false : 'inline',
treeShaking: true,
outfile: 'main.js',
}).catch(() => process.exit(1));
});

if (prod) {
await context.rebuild();
process.exit(0);
} else {
await context.watch();
}
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "obsidian-command-alias-plugin",
"name": "Command Alias",
"version": "2.0.0",
"minAppVersion": "0.9.12",
"version": "2.0.1",
"minAppVersion": "0.15.0",
"description": "This plugin gives aliases to Obsidian commands.",
"author": "yajamon<[email protected]>",
"authorUrl": "https://github.com/yajamon/obsidian-command-alias-plugin",
Expand Down
Loading

0 comments on commit 9cc24f9

Please sign in to comment.