brick-break
v1.3.1
Published
Play a Lego break sound when your build fails
Maintainers
Readme
🧱 brick-break
that satisfying lego break sound when your build fails
saw this idea on tiktok and had to make it real. now every failed build hits different.
install
npm i -D brick-breakthen wrap your build command:
{
"scripts": {
"dev": "brick-break next dev",
"build": "brick-break next build"
}
}or just run it directly:
npx brick-break next buildglobal install (recommended for non-js projects)
npm i -g brick-breaknow you can use bb anywhere:
bb cargo build
bb go build
bb pytest
bb makeworks with everything
bb next build
bb npm run build
bb tsc
bb cargo build
bb go buildif it can fail, brick-break can make it funnier.
next.js hmr support
for errors that happen while the dev server is running (hot reload):
bb initthis automatically adds <BrickBreak /> to your layout.tsx.
or add it manually:
// app/layout.tsx
import { BrickBreak } from 'brick-break/next'
export default function RootLayout({ children }) {
return (
<html>
<body>
<BrickBreak />
{children}
</body>
</html>
)
}now errors play the sound even during hot reload.
how it works
- runs your command
- build fails? plays the sound
- thats it
(for next.js hmr: watches for the error overlay in the browser)
requirements
uses your system audio player (already installed):
- mac - afplay
- linux - paplay/aplay
- windows - powershell
license
MIT
