Budo - Browserify Development Server

11.8.4 · abandoned · verified Tue Apr 21

Budo is a command-line interface (CLI) and programmatic tool designed for rapid prototyping with Browserify, providing a development server that focuses on incremental reloading and LiveReload integration. It serves a default `index.html`, bundles JavaScript with Browserify on the fly, and suspends HTTP responses until the bundle is ready, preventing stale content. A key feature is its ability to watch HTML and CSS files, injecting CSS changes without a full page reload, and providing clear error messages directly in the DOM and browser console. As of its latest stable release, 11.8.4 (published September 2017), the project appears to be in an abandoned state, with no significant updates in recent years. It differentiates itself by tightly integrating Browserify's bundling capabilities with a development server and LiveReload, offering features like SSL support and a rich API for custom development workflows, making it suitable for quick development cycles, especially for smaller client-side projects that leverage the Browserify ecosystem.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to use Budo's CLI to serve, bundle, and LiveReload a simple JavaScript application with Browserify and Babel, serving static assets from a separate directory.

// First, install budo globally:
// npm install -g budo

// Create an entry JavaScript file, e.g., `src/main.js`:
// console.log('Hello from Budo!');
// const element = document.createElement('h1');
// element.textContent = 'Welcome to your Budo app!';
// document.body.appendChild(element);

// Create a simple HTML file, e.g., `public/index.html`:
/*
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Budo Quickstart</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <script src="bundle.js"></script>
</body>
</html>
*/

// Create a simple CSS file, e.g., `public/style.css`:
// body { font-family: sans-serif; margin: 20px; background-color: #f0f0f0; }
// h1 { color: #333; }

// Run Budo from your terminal in the project root:
// budo src/main.js:bundle.js --dir public/ --live --open --host 0.0.0.0 --port 9988 -- -t [ babelify --presets=@babel/preset-env ]

// Explanation:
// - `src/main.js:bundle.js`: Bundles `src/main.js` and serves it as `bundle.js`.
// - `--dir public/`: Serves static files from the `public/` directory.
// - `--live`: Enables LiveReload for HTML, CSS, and JS changes (CSS injected, HTML/JS reloaded).
// - `--open`: Automatically opens the server URL in your default browser.
// - `--host 0.0.0.0 --port 9988`: Makes the server accessible on all network interfaces on port 9988.
// - `-- -t [ babelify --presets=@babel/preset-env ]`: Passes a transform to Browserify (e.g., Babelify for modern JS syntax).
//   (Requires `npm install --save-dev babelify @babel/core @babel/preset-env`)

view raw JSON →