mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 07:01:30 +00:00
feat: standalone binary support with Bun
- Add build:binary script for Bun compilation - Add paths.ts for cross-platform asset resolution (npm/bun/tsx) - Add GitHub Actions workflow for automated binary releases - Update README with installation options Based on #89 by @steipete
This commit is contained in:
parent
4a60bffe3b
commit
c4a65ad8b9
17 changed files with 626 additions and 65 deletions
|
|
@ -1,13 +1,11 @@
|
|||
import * as fs from "node:fs";
|
||||
import * as os from "node:os";
|
||||
import * as path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import type { EditorTheme, MarkdownTheme, SelectListTheme } from "@mariozechner/pi-tui";
|
||||
import { type Static, Type } from "@sinclair/typebox";
|
||||
import { TypeCompiler } from "@sinclair/typebox/compiler";
|
||||
import chalk from "chalk";
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
import { getThemeDir } from "../paths.js";
|
||||
|
||||
// ============================================================================
|
||||
// Types & Schema
|
||||
|
|
@ -321,8 +319,9 @@ let BUILTIN_THEMES: Record<string, ThemeJson> | undefined;
|
|||
|
||||
function getBuiltinThemes(): Record<string, ThemeJson> {
|
||||
if (!BUILTIN_THEMES) {
|
||||
const darkPath = path.join(__dirname, "dark.json");
|
||||
const lightPath = path.join(__dirname, "light.json");
|
||||
const themeDir = getThemeDir();
|
||||
const darkPath = path.join(themeDir, "dark.json");
|
||||
const lightPath = path.join(themeDir, "light.json");
|
||||
BUILTIN_THEMES = {
|
||||
dark: JSON.parse(fs.readFileSync(darkPath, "utf-8")) as ThemeJson,
|
||||
light: JSON.parse(fs.readFileSync(lightPath, "utf-8")) as ThemeJson,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue