Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions dev.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import updates from "pear-updates";
import { spawn } from "bare-subprocess";
import { isWindows } from ".";
import updates from 'pear-updates'
import { spawn } from 'bare-subprocess'
import { isWindows } from '.'

isWindows
? spawn("npm.cmd", ["run", "build"], { stdio: "inherit" })
: spawn("npm", ["run", "build"], { stdio: "inherit" });
? spawn('npm.cmd', ['run', 'build'], { stdio: 'inherit' })
: spawn('npm', ['run', 'build'], { stdio: 'inherit' })

const REGULATE = 500;
let throttle = Date.now() + REGULATE;
const REGULATE = 500
let throttle = Date.now() + REGULATE
updates({ app: true, version: { key: null } }, (update) => {
if (Date.now() < throttle) return;
throttle = Infinity;
console.log("Update", update);
if (Date.now() < throttle) return
throttle = Infinity
console.log('Update', update)
const build = isWindows
? spawn("npm.cmd", ["run", "build"], { stdio: "inherit" })
: spawn("npm", ["run", "build"], { stdio: "inherit" });
build.on("close", () => {
throttle = Date.now() + REGULATE;
});
});
? spawn('npm.cmd', ['run', 'build'], { stdio: 'inherit' })
: spawn('npm', ['run', 'build'], { stdio: 'inherit' })
build.on('close', () => {
throttle = Date.now() + REGULATE
})
})
22 changes: 11 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/* global Pear */
import Runtime from "pear-electron";
import Bridge from "pear-bridge";
import process from "bare-process";
import Runtime from 'pear-electron'
import Bridge from 'pear-bridge'
import process from 'bare-process'

const onDisk = Pear.app.key === null;
if (onDisk) await import("./dev.js");
const onDisk = Pear.app.key === null
if (onDisk) await import('./dev.js')

const bridge = new Bridge();
await bridge.ready();
const runtime = new Runtime();
const bridge = new Bridge()
await bridge.ready()
const runtime = new Runtime()

const pipe = await runtime.start({ bridge });
const pipe = await runtime.start({ bridge })

pipe.on("end", () => Pear.exit());
pipe.on('end', () => Pear.exit())

export const isWindows = process.platform === "win32";
export const isWindows = process.platform === 'win32'
8 changes: 8 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ textarea:focus {
display: flex;
flex-direction: column;
gap: 0.5rem;
padding: 0.5rem 0.25rem 0.5rem 0.5rem;
padding: 0.5rem 0.75rem 0.5rem 0.5rem;
overflow: auto;
flex: 1;
}
Expand Down Expand Up @@ -964,7 +964,7 @@ textarea:focus {
background: var(--bg-secondary);
box-shadow: 2px 2px 0 var(--border);
min-width: 140px;
z-index: 1001;
z-index: 999;
display: flex;
flex-direction: column;
padding: 0.25rem;
Expand Down
Loading