🔊 Build Sound Alert
A VS Code extension that plays a sound when your npm run build command fails — so you never miss a broken build again.
Features
- ▶️ Runs
npm run build directly from the Command Palette
- 🔴 Plays a custom sound when the build fails
- ✅ Shows a success notification when the build passes
- 🎵 Supports any
.mp3 or .wav sound file of your choice
Demo
| Build Result |
What Happens |
| ❌ Failed |
Error notification + sound plays |
| ✅ Success |
Success notification shown |
Requirements
- Node.js installed on your machine
- A project with an
npm run build script in its package.json
Usage
- Open a project folder that has an
npm run build script
- Open the Command Palette with
Ctrl+Shift+P (or Cmd+Shift+P on Mac)
- Type "Run Build with Sound Alert" and press
Enter
- If the build fails — you'll hear it! 🔊
Custom Sound
By default, the extension ships with a built-in fail sound. You can swap it out with any sound you like:
- Find your desired
.mp3 or .wav file
- Replace the file at:
<extension-folder>/sounds/fail.mp3
Or configure a custom path via settings (see below).
Extension Settings
You can configure a custom sound file path in your VS Code settings:
{
"buildSound.failSoundPath": "/absolute/path/to/your/sound.mp3"
}
| Setting |
Type |
Default |
Description |
buildSound.failSoundPath |
string |
"" |
Absolute path to a custom sound file to play on build failure |
How It Works
- The extension runs
npm run build in your workspace root using Node's child_process
- It monitors the exit code of the process
- If the exit code is non-zero (build failed) → plays your sound file
- If the exit code is zero (build passed) → shows a success message
Known Issues
- Only supports single-root workspaces (the build runs in the first workspace folder)
- Requires
npm to be available in your system's PATH
- Sound playback depends on the
sound-play package and your OS audio settings
Release Notes
0.0.1
- Initial release
- Support for
npm run build failure detection
- Cross-platform sound playback (Windows, macOS, Linux)
- Custom sound file configuration via settings
Contributing
Found a bug or have a feature request? Feel free to open an issue or submit a pull request.
License
MIT License — feel free to use, modify, and distribute.
Enjoy never missing a broken build again! 🎉
| |