Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
budo@5 is still in beta, you can test it like so:
# install the latest version of budo & garnish
npm install budo@next garnish -g
# run the tools
budo src/index.js | garnish
This is a browserify development server inspired by beefy and wzrd, but specifically focused on incremental reloading, LiveReload integration (including CSS injection), and other high-level features.
To install:
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 9966
budo index.js
# enable LiveReload on HTML/CSS/JS file changes
budo index.js --live
# pass some options to browserify
budo index.js --live -- -t babelify
Then open http://localhost:9966/ to see the content in action.
Budo emits ndjson, so a pretty-printer like garnish or bistre is recommended for better logging. Example:
# install garnish if you don't have it
npm install garnish -g
# pipe to garnish for pretty-printing
budo index.js | garnish
Result:
See docs for more details. PRs/suggestions/comments welcome.
At a glance:
index.html
Below is an example of how syntax errors look during development, using the babelify transform.
Details for 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 for base static content
--serve, -s override the bundle path being served
--live, -l enable default LiveReload integration
--live-port, -L the LiveReload port, default 35729
--open, -o launch the browser once connected
--pushstate, -P always render the index page instead of a 404 page
--poll=N use polling for file watch, with optional interval N
--no-stream do not print messages to stdout
--no-debug do not use inline source maps
--no-portfind will not attempt auto-portfinding
--no-error-handler disable default DOM error handling
By default, messages will be printed to process.stdout
, and --debug
will be sent to browserify (for source maps). You can turn these off with --no-stream
and --no-debug
, respectively.
Everything after --
is passed directly to browserify. Example:
budo index.js --live -- -t [ babelify --exetension .es6 ]
The API mirrors the CLI except it does not write to process.stdout
by default.
var budo = require('budo')
var babelify = require('babelify')
budo('./src/index.js', {
live: true, // setup live reload
port: 8000, // use this port
browserify: {
transform: babelify // ES6
}
}).on('connnect', function (ev) {
console.log('Server running on %s', ev.uri)
console.log('LiveReload running on port %s', ev.livePort)
}).on('update', function (buffer) {
console.log('bundle - %d bytes', buffer.length)
})
See API usage for details.
budō combines several smaller and less opinionated modules.
index.html
fileMIT, see LICENSE.md for details.
FAQs
a browserify server for rapid prototyping
The npm package budo receives a total of 5,476 weekly downloads. As such, budo popularity was classified as popular.
We found that budo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.