From fdb81f76a7c56e6e208f3a2b0442ca5491d51259 Mon Sep 17 00:00:00 2001 From: Jiaxin Peng Date: Tue, 29 Aug 2023 14:21:12 +0100 Subject: [PATCH] Update version to 0.1.1 --- esbuild.config.mjs | 89 ++++++++++++++++++++++++---------------------- manifest.json | 2 +- package.json | 2 +- 3 files changed, 48 insertions(+), 45 deletions(-) diff --git a/esbuild.config.mjs b/esbuild.config.mjs index de689f0..6ab5f6a 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -8,49 +8,52 @@ 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 ctx = await esbuild.context({ - banner: { - js: banner, - }, - entryPoints: ['src/main.ts'], - bundle: true, - external: [ - 'obsidian', - 'electron', - '@codemirror/autocomplete', - '@codemirror/closebrackets', - '@codemirror/collab', - '@codemirror/commands', - '@codemirror/comment', - '@codemirror/fold', - '@codemirror/gutter', - '@codemirror/highlight', - '@codemirror/history', - '@codemirror/language', - '@codemirror/lint', - '@codemirror/matchbrackets', - '@codemirror/panel', - '@codemirror/rangeset', - '@codemirror/rectangular-selection', - '@codemirror/search', - '@codemirror/state', - '@codemirror/stream-parser', - '@codemirror/text', - '@codemirror/tooltip', - '@codemirror/view', - ...builtins], - format: 'cjs', - target: 'es2016', - logLevel: "info", - sourcemap: prod ? false : 'inline', - treeShaking: true, - outfile: 'main.js', -}) - -await ctx.watch(); - -// await ctx.dispose(); +(async () => { // Enclose everything in an async function for using await + const ctx = await esbuild.context({ + banner: { + js: banner, + }, + entryPoints: ['src/main.ts'], + bundle: true, + external: [ + 'obsidian', + 'electron', + '@codemirror/autocomplete', + '@codemirror/closebrackets', + '@codemirror/collab', + '@codemirror/commands', + '@codemirror/comment', + '@codemirror/fold', + '@codemirror/gutter', + '@codemirror/highlight', + '@codemirror/history', + '@codemirror/language', + '@codemirror/lint', + '@codemirror/matchbrackets', + '@codemirror/panel', + '@codemirror/rangeset', + '@codemirror/rectangular-selection', + '@codemirror/search', + '@codemirror/state', + '@codemirror/stream-parser', + '@codemirror/text', + '@codemirror/tooltip', + '@codemirror/view', + ...builtins + ], + format: 'cjs', + target: 'es2016', + logLevel: "info", + sourcemap: prod ? false : 'inline', + treeShaking: true, + outfile: 'main.js', + }); + if (!prod) { + await ctx.watch(); + } else { + await ctx.dispose(); + } +})().catch(() => process.exit(1)); // Use .catch here to handle any errors diff --git a/manifest.json b/manifest.json index f706468..5c3c3e9 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "share-to-notionnext", "name": "Share to NotionNext", - "version": "0.1.0", + "version": "0.1.1", "minAppVersion": "0.0.1", "description": "Shares obsidian md file to notion with notion api for NotionNext web deploy, motivated by EasyChris/obsidian-to-notion.", "author": "EasyChris, jxpeng98", diff --git a/package.json b/package.json index f3eb107..01690a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "share-to-notionnext", - "version": "0.1.0", + "version": "0.1.1", "type": "module", "description": "Shares obsidian md file to notion with notion api for NotionNext web deploy, motivated by EasyChris/obsidian-to-notion.", "main": "main.js",