From aca48e8140226c911e865c41fcb4737ccd6627fe Mon Sep 17 00:00:00 2001 From: Michael Brade Date: Thu, 12 Mar 2015 00:04:22 +0100 Subject: [PATCH] allow components to have a separate style file specify the style file with component.prototype.style --- lib/components.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/components.js b/lib/components.js index ce27131f3..65230d082 100644 --- a/lib/components.js +++ b/lib/components.js @@ -185,6 +185,11 @@ App.prototype.component = function(viewName, constructor) { } } + if (constructor.prototype.style) { + var styleFilename = constructor.prototype.style; + this.loadStyles(styleFilename); + } + // Associate the appropriate view with the component type var view = this.views.find(viewName); if (!view) {