开发者社区> 镜像站> NPM> watchify-request
watchify-request
Wraps a watchify instance into an HTTP request handler
Last updated 4 years ago by yoshuawuyts .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install watchify-request 
SYNC missed versions from official npm registry.

watchify-request experimental

Wraps a watchify instance into an HTTP request handler, performing the minimal amount of rebundling required and pausing requests mid-build to avoid getting old versions of your script on reload.

Usage

NPM

handler = watchifyRequest(bundler)

Creates a request handler out of a watchify or browserify instance.

handler(req, res[, done])

Handles the request, where req is an HTTPRequest instance and res is its matching HTTPResponse instance. done(err, body) is optional, and called if you want to add a custom error handler or manipulate the request after browserify is done.

See also

License

MIT. See LICENSE.md for details.

Current Tags

  • 2.1.0                                ...           latest (4 years ago)

4 Versions

  • 2.1.0                                ...           4 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 2
Dependencies (2)
Dev Dependencies (0)
None