diff --git a/public/templates/header.tpl b/public/templates/header.tpl index 9682271b8a..a391d9fd04 100644 --- a/public/templates/header.tpl +++ b/public/templates/header.tpl @@ -11,9 +11,6 @@ link="{linkTags.link}" rel="{linkTags.rel}" type="{linkTags.type}" href="{linkTags.href}" /> - - - diff --git a/src/plugins.js b/src/plugins.js index 40aa6b996e..32d902b03b 100644 --- a/src/plugins.js +++ b/src/plugins.js @@ -62,6 +62,8 @@ var fs = require('fs'), Plugins.loadedHooks = {}; Plugins.staticDirs = {}; Plugins.cssFiles.length = 0; + Plugins.lessFiles.length = 0; + Plugins.clientScripts.length = 0; // Read the list of activated plugins and require their libraries async.waterfall([ @@ -195,21 +197,12 @@ var fs = require('fs'), winston.info('[plugins] Found ' + pluginData.css.length + ' CSS file(s) for plugin ' + pluginData.id); } - if (!pluginData.staticDir) { - Plugins.cssFiles = Plugins.cssFiles.concat(pluginData.css.map(function(file) { - return path.join('/plugins', file); - })); - } else { - winston.warn('[plugins/' + pluginData.id + '] staticDir is deprecated, define CSS files with new staticDirs instead.'); - Plugins.cssFiles = Plugins.cssFiles.concat(pluginData.css.map(function(file) { - return path.join('/plugins', pluginData.id, file); - })); - } - - next(); - } else { - next(); + Plugins.cssFiles = Plugins.cssFiles.concat(pluginData.css.map(function(file) { + return path.join(pluginData.id, file); + })); } + + next(); }, function(next) { // LESS files for plugins diff --git a/src/routes/meta.js b/src/routes/meta.js index cc5683b924..3b5fbed3f7 100644 --- a/src/routes/meta.js +++ b/src/routes/meta.js @@ -26,6 +26,11 @@ var path = require('path'), source += '\n@import "./' + plugins.lessFiles[x] + '";'; } + // ... and for each CSS file + for(x=0,numCSS=plugins.cssFiles.length;x