Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ App.prototype.component = function(name, constructor, isDependency) {
}
}
}

// Load style for component
if (constructor.prototype.style) {
this.loadStyles(constructor.prototype.style);
}

// Register or find views specified by the component
var view;
Expand Down
11 changes: 10 additions & 1 deletion lib/AppForServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,17 @@ AppForServer.prototype._updateScriptViews = function() {
AppForServer.prototype._autoRefresh = function(backend) {
var agents = this.agents = {};
var app = this;

backend.use('receive', function(request, next) {
if (request.data.derby) {
return backend.trigger('derby_debug', request.agent, {data:request.data}, function(err) {
// All apps triggered derby_debug
});
}
next();
});

backend.use('derby_debug', function(request, next) {
var data = request.data;
if (data.derby) {
app._handleMessage(request.agent, data.derby, data);
Expand Down