budo@5 is still in beta, you can test it like so:
# install the latest version of budo & garnishnpm install budo@next garnish -g# run the toolsbudo src/index.js | garnish
npm install budo -g
Running budo will start a server with a default
index.html and incrementally bundle your source on filesave. The requests are delayed until the bundle has finished, so you won't be served stale or empty bundles if you refresh the page mid-update. Examples:
# serve file on port 9966budo index.js# enable LiveReload on HTML/CSS/JS file changesbudo index.js --live# pass some options to browserifybudo index.js --live -- -t babelify
Then open http://localhost:9966/ to see the content in action.
# install garnish if you don't have itnpm install garnish -g# pipe to garnish for pretty-printingbudo index.js | garnish
See docs for more details. PRs/suggestions/comments welcome.
At a glance:
- stubs a default
- fast incremental bundling, suspending the response until the new source is ready
- watches HTML and CSS files for changes; CSS is injected without reloading the page
- allows for detailed logging with garnish
- provides clear error messaging during development in DOM and console
Below is an example of how syntax errors look during development, using the babelify transform.
- command line usage
- API usage
- running tests and examples
- rapid prototyping with budō
- experimental script injection with budo-chrome
budo command-line interface.
Usage:budo index.js [opts] -- [browserify opts]Options:--help, -h show help message--version show version--port, -p the port to run, default 9966--host, -H the host, default "localhost"--dir, -d a path, or array of paths
By default, messages will be printed to
--debug will be sent to browserify (for source maps). You can turn these off with
-- is passed directly to browserify. Example:
budo indexjs --live -- -t babelify --exetension es6
The API mirrors the CLI except it does not write to
process.stdout by default.
var budo =var babelify =
See API usage for details.
budō combines several smaller and less opinionated modules.
- watchify-middleware - the underlying request handler for serving incremental reloads
- watchify-server - a less opinionated alternative to budo, built on the same underlying modules
- simple-html-index - a stream for a default
MIT, see LICENSE.md for details.