update packages and modify upload2notion

This commit is contained in:
Jiaxin Peng
2023-08-29 13:39:36 +01:00
parent fb7294d607
commit 722ca7bb56
11 changed files with 710 additions and 690 deletions

View File

@@ -11,11 +11,11 @@ if you want to view the source, please visit the github repository of this plugi
const prod = (process.argv[2] === 'production');
esbuild.build({
const ctx = await esbuild.context({
banner: {
js: banner,
},
entryPoints: ['main.ts'],
entryPoints: ['src/main.ts'],
bundle: true,
external: [
'obsidian',
@@ -43,10 +43,14 @@ esbuild.build({
'@codemirror/view',
...builtins],
format: 'cjs',
watch: !prod,
target: 'es2016',
logLevel: "info",
sourcemap: prod ? false : 'inline',
treeShaking: true,
outfile: 'main.js',
}).catch(() => process.exit(1));
})
await ctx.watch();
// await ctx.dispose();