diff --git a/deno.jsonc b/deno.jsonc index e9e943a..de30d25 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 573aa96..9e46fb4 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; }