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 <noreply@anthropic.com>
This commit is contained in:
Corey Johnson 2026-03-12 13:33:34 -07:00
parent 5ac02af171
commit 11366d62b2
6 changed files with 23 additions and 3 deletions

11
.npmignore Normal file
View File

@ -0,0 +1,11 @@
.context/
tmp/
bun.lock
src/
docs/
cli.ts
index.tsx
tsconfig.json
bunfig.toml
CLAUDE.md
.npmrc

2
bunfig.toml Normal file
View File

@ -0,0 +1,2 @@
jsx = "react-jsx"
jsxImportSource = "hono/jsx"

2
cli.ts Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env bun
import './src/server'

View File

@ -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",

View File

@ -1 +1,2 @@
/** @jsxImportSource hono/jsx */
export default () => <h1>baudy</h1>

View File

@ -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... `)
}