Web client for üWave.
For running in the browser: something modern. The aim is to support ~IE10+ and other modern browsers (recent Chromes and Firefoxes, at least). If you use something reasonably recent and üWave doesn't work, file a bug!
For development: Node versions >=4 and NPM 3.x.
Some üWave components aren't yet published to NPM, so you have to do a bit of manual setup.
cd ./u-wave-corenpm linkcd ../u-wave-api-v1npm link
npm link command will create a symlink to the module in the global modules
folder. Now, you can create symlinks to the global modules folder inside the
cd ../u-wave-webnpm link u-wave-core u-wave-api-v1# and install web client dependencies:npm install
…and now you should be good to go!
There are two main build scripts: one for development, and one for production.
The development script runs a local üWave server and auto-reloads the web client when you make changes.
npm start # or `npm run dev`
When building the üWave web client for use on a server, the production build should be used instead. It removes costly debugging helpers from the code and minifies everything as much as possible.
npm run prod
prod script doesn't run a local server. To try out your production build,
you can use the standalone
npm run serve
Create a Web client middleware for use with express-style server libraries.
;;;;;const app = ;const uw = ;app;app;app;app;
Create a new üWave web client.
options.apiBase - Base URL to the mount point of the
üWave Web API to talk to.
/v1, but it's recommended to set this explicitly.
options.emoji - An object describing the emoji that will be available in
the chat. Keys are emoji shortcodes (without
:), and values are image
options.recaptcha - An object containing ReCaptcha options used to ensure
new user registrations are human. This option should only be passed if the
Web API middleware is configured to check for ReCaptcha
options.recaptcha.key- ReCaptcha site key. This can be obtained from the "Keys" panel in the ReCaptcha site admin page.
Add a media source. Media sources should also be registered with the üWave Core module on the server side.
sourceType- String representing the source type. Must be the same as the one used on the server side.
sourcePlugin- Factory function for the plugin. This factory function will receive two arguments: the
Uwaveclass instance, and the options object passed to
options- Options to be passed to the source plugin.
Start the web client and render it into a DOM element.
target- A DOM element.
The üWave web client is licensed under the MIT license.