mirror of
https://github.com/Hopiu/postal.js.git
synced 2026-03-16 22:20:23 +00:00
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
var socket;
|
|
|
|
require.config( {
|
|
paths : {
|
|
'text' : 'lib/requirejs-text-1.0.2',
|
|
'backbone' : 'lib/backbone',
|
|
'underscore': 'lib/underscore',
|
|
'machina' : 'lib/machina',
|
|
'postal' : 'lib/postal',
|
|
'amplify' : 'lib/amplify',
|
|
'bus' : 'infrastructure/bus'
|
|
},
|
|
baseUrl: 'js'
|
|
} );
|
|
|
|
require( [ 'backbone', 'jquery', 'underscore', 'machina', 'postal', 'lib/postal.diagnostics', 'infrastructure/postal.socket-client' ],
|
|
function( Backbone, $, _, machina, postal ){
|
|
|
|
// for debugging purposes ONLY for now:
|
|
window.postal = postal;
|
|
|
|
/*postal.addWireTap( function( d, e ){
|
|
if( /search/.test(e.topic) ) {
|
|
console.log( JSON.stringify( e ) );
|
|
}
|
|
});
|
|
*/
|
|
postal.connections.socket.socketMgr.on( "*", function( evnt, data ){
|
|
var args = [].slice.call( arguments,1 );
|
|
if( args[0] === "postal.remote" ) {
|
|
//console.log( "FSM Event: " + evnt + " - " + JSON.stringify( args[0] ) );
|
|
}
|
|
else {
|
|
//console.log( "FSM Event: " + evnt + " - " + JSON.stringify( args ) );
|
|
}
|
|
});
|
|
|
|
require([ 'infrastructure/app' ], function( app ) {
|
|
window.app = app;
|
|
});
|
|
|
|
});
|