From 11366d62b2a5fcc5963fc9c28837d9ccf03413ea Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Thu, 12 Mar 2026 13:33:34 -0700 Subject: [PATCH] Add bunx support for easy sharing - Add bin entry and CLI shim for `bunx baudy` - Add JSX pragmas so hono/jsx resolves without tsconfig - Add bunfig.toml, .npmignore for publishing - Reorder error hints to prioritize headphone disconnect Co-Authored-By: Claude Opus 4.6 --- .npmignore | 11 +++++++++++ bunfig.toml | 2 ++ cli.ts | 2 ++ package.json | 5 ++++- src/pages/index.tsx | 1 + src/server/index.tsx | 5 +++-- 6 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 .npmignore create mode 100644 bunfig.toml create mode 100644 cli.ts diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..7878405 --- /dev/null +++ b/.npmignore @@ -0,0 +1,11 @@ +.context/ +tmp/ +bun.lock +src/ +docs/ +cli.ts +index.tsx +tsconfig.json +bunfig.toml +CLAUDE.md +.npmrc diff --git a/bunfig.toml b/bunfig.toml new file mode 100644 index 0000000..9f8e5df --- /dev/null +++ b/bunfig.toml @@ -0,0 +1,2 @@ +jsx = "react-jsx" +jsxImportSource = "hono/jsx" diff --git a/cli.ts b/cli.ts new file mode 100644 index 0000000..a7af8b8 --- /dev/null +++ b/cli.ts @@ -0,0 +1,2 @@ +#!/usr/bin/env bun +import './src/server' diff --git a/package.json b/package.json index be2e577..a6afad3 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,11 @@ { "name": "baudy", + "version": "0.0.6", "module": "index.tsx", "type": "module", - "private": true, + "bin": { + "baudy": "dist/cli.js" + }, "scripts": { "toes": "bun run --watch index.tsx", "start": "bun run index.tsx", diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 560503f..dfc1ada 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1 +1,2 @@ +/** @jsxImportSource hono/jsx */ export default () =>

baudy

diff --git a/src/server/index.tsx b/src/server/index.tsx index e7687b1..b9d9cd3 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -1,3 +1,4 @@ +/** @jsxImportSource hono/jsx */ import { Hype } from '@because/hype' import { define, stylesToCSS } from '@because/forge' import factory from 'ggwave' @@ -725,9 +726,9 @@ async function startup() { console.log(`${RED}${BOLD}✗ Couldn't hear the test chirp.${RESET}`) console.log() console.log(`${YELLOW}Try:${RESET}`) - console.log(` • Turn your volume up`) - console.log(` • Check System Settings > Sound (output: "${speaker}", input: "${mic}")`) console.log(` • Disconnect headphones — sound needs to travel through the air`) + console.log(` • Check System Settings > Sound (output: "${speaker}", input: "${mic}")`) + console.log(` • Turn your volume up`) console.log() await prompt(` Press Enter to continue anyway... `) }