From b0c9fd012483ce4f63f79e874e1f610196506794 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Wed, 4 Jan 2023 10:45:11 +0100 Subject: [PATCH] Remove separate upgrades from desktop --- deno.jsonc | 8 +++++++- desktop/src/instance.ts | 8 +------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deno.jsonc b/deno.jsonc index e9e943ab..de30d258 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -11,7 +11,13 @@ "bundle": "deno bundle silverbullet.ts dist/silverbullet.js", // Regenerates some bundle files (checked into the repo) // Install lezer-generator with "npm install -g @lezer/generator" - "generate": "deno run -A plugos/gen.ts && lezer-generator common/markdown_parser/query.grammar -o common/markdown_parser/parse-query.js" + "generate": "deno run -A plugos/gen.ts && lezer-generator common/markdown_parser/query.grammar -o common/markdown_parser/parse-query.js", + // Install npm dependencies for desktop app + "desktop:install": "cd desktop && npm install", + // Run the desktop app for local development + "desktop:run": "cd desktop && npm start", + // Build the desktop app as a package for this platform + "desktop:build": "deno task build && deno task bundle && cd desktop && npm run make" }, "compilerOptions": { diff --git a/desktop/src/instance.ts b/desktop/src/instance.ts index 573aa96b..9e46fb42 100644 --- a/desktop/src/instance.ts +++ b/desktop/src/instance.ts @@ -69,14 +69,8 @@ function determineSilverBulletScriptPath(): string { if (!existsSync(scriptPath)) { console.log("Dev mode"); // Assumption: we're running in dev mode (npm start) - return "../silverbullet.ts"; + scriptPath = "../silverbullet.ts"; } - const userData = app.getPath("userData"); - if (existsSync(`${userData}/silverbullet.js`)) { - // Custom downloaded (upgraded) version - scriptPath = `${userData}/silverbullet.js`; - } - return scriptPath; }