rightful-hot
v3.2.4
Published
App convention for RiotJS+ZappaJS
Downloads
2
Readme
App convention for RiotJS+ZappaJS
Starts riot with the conventions of ZappaJS-client, with the following mixins:
@wrapper
to wrap riot events into a Promise@throttle
to throttle calls to a function- and additional riot events for socket.io errors.
Also provides two Riot tags:
rightful-hot/i18n
rightful-hot/language-selector
Typically started as
{main,Debug} = require 'rightful-hot'
config =
messages: 'en-US': {...}
socketio_module =
include: ->
# executed in a ZappaJS-client context
@on 'event-from-server', -> @ev.trigger 'event'
@ev.on 'event-from-client', => @emit 'event-to-server'
main config, seem ->
yield @include socketio_module
@riot.mount '*', client:true