Registry / devops / dev-refresh

dev-refresh

JSON →
library1.2.1jsnpmunverified

Dev-refresh is a CLI utility that watches directories for changes, runs a command (e.g., bundler or transpiler) on change, and automatically reloads the browser. If the command fails, the error message is displayed on the page, and the page is not reloaded. Current stable version: 1.2.1. Release cadence: low, with infrequent updates. It supports serving local files or proxying to an existing server. Differentiators: lightweight, no build step required, inline error display. Not for production use.

npm install dev-refresh
INSTALL
IMPORT
SIG · DEV-REFRESH
D
dev-refresh
devopsjavascriptv1.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dev-refresh (CLI)
npx dev-refresh --serve public
npm install -g dev-refresh && dev-refresh
CLI tool; not imported as a library. It is not a CommonJS/E SM module.
npm script usage
{"scripts": {"watch": "dev-refresh --serve public --cmd 'npm run build' src"}}
Add to package.json scripts; run with npm run watch.

Watch current directory, serve its files on default port, run echo and ls on change, reload browser.

npx dev-refresh --serve . --cmd 'echo changed && ls' .
dev-refresh --version
Debug
Known issues
gotchaThe --cmd option runs in the shell, so ensure proper escaping of arguments.
fix
Use single quotes for commands with spaces or special characters.
affects: >=0.0.0
gotchaDev-refresh is not intended for production use; it serves files with auto-reload, which can be a security risk.
fix
Do not expose dev-refresh to the public internet.
affects: >=0.0.0
Errors
Common errors & fixes
Error: ENOENT: no such file or directory, stat '...'
The watched directory does not exist.
fix
Ensure the directory path provided to dev-refresh exists.
Error: listen EADDRINUSE :::8080
Port 8080 is already in use by another process.
fix
Use the --port option to specify a different port.
Upgrade
Version history
1.2.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
4
Resources
dev-refresh — npm install dev-refresh · libregistry