collar.js-dev-webclient
v1.0.3
Published
collar.js client side dev tool for web
Downloads
4
Readme
Collar.js Dev Tool (web client)
This tool is used to collect dev information in your collar.js based web application.
#!!! This branch is published as the npm module: collar.js-dev-webclient TODO: fork this branch to a new repo
Install
For webpack/browserify:
npm install collar.js-dev-webclient --save-dev
Or, you can directly download it from github:
https://github.com/bhou/collarjs-dist
Usage
For bundle tool, like webpack/browserify:
const DevToolAddon = require('collar.js-dev-webclient');
collar.use(new DevToolAddon());
For web application
<script src="collar.js-dev-webclient.js"></script>
It will register a global variable DevToolAddon
;
collar.use(new DevToolAddon());
You can pass options to the DevToolAddon
constructor:
- process: string, the process name
- url: string, the collar-dev-server url, default: ws://localhost:7500
- interval: long, the interval to send collected data to collar dev server in milliseconds, default, 1000
About version
You need to use the right version of collar.js-dev-webclient to match the collar dev server version.
Usually both of them use the same major version to keep the compatibility:
collar-dev-server v0.* matches collar.js-dev-webclient v0.* collar-dev-server v1.* matches collar.js-dev-webclient v1.*