Kureev / browserify-patch-server

Patch server for browserify
15 stars 0 forks source link

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:

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