0.4.2 • Published 10 years ago

browserify-patch-server v0.4.2

Weekly downloads
-
License
MIT
Repository
-
Last release
10 years ago

Browserify patch server

Because we need HMR an analog for webpack's webpack-dev-server

Requirements

node > 0.10 or io.js > 2.0 installed

Install

npm install browserify-patch-server --save-dev

Getting started

Start browserify-patch-server:

node_modules/.bin/bfps bundles/file.js

or

node_modules/.bin/browserify-patch-server bundles/file.js

With browserify-patch-server you can also track multiple bundles:

node_modules/.bin/browserify-patch-server bundles/file.js bundles/file2.js

Now you need to have a client which will connect to localhost:<port>. After establishing connection you'll start receiving messages:

  • Bundle has been changed successfully:
  {
    "bundle": BundleName <String>,
    "patch": Patch <String>
  }
  • Bundle has syntax error:
  {
    "bundle": BundleName <String>,
    "error": Error <String>
  }

Also, once your client will connect to the server it'll receive an initial bundle(s) and message that connection has been established:

{
  "message": "Connected to browserify-patch-server",
  "sources": sources <Array>,
}

Examples

Feel free to submit your example!

Configuration

By default, browserify-patch-server use port 8081 for websocket server. If you want to change this port you need to specify -p or --port parameter:

node_modules/.bin/browserify-patch-server bundles/file.js -p 8888
0.4.2

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago