mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-24 01:10:31 +01:00
fixed issue where plugin css and js wasn't loaded -- also less files no longer blow up
This commit is contained in:
@@ -332,9 +332,8 @@ var fs = require('fs'),
|
||||
baseThemePath = path.join(nconf.get('themes_path'), (themeData['theme:type'] && themeData['theme:type'] === 'local' ? themeId : 'nodebb-theme-vanilla')),
|
||||
paths = [
|
||||
baseThemePath,
|
||||
path.join(__dirname, '../../node_modules'),
|
||||
path.join(__dirname, '../public/vendor/fontawesome/less'),
|
||||
path.join(__dirname, '../public/vendor/fontawesome/fonts')
|
||||
path.join(__dirname, '../node_modules'),
|
||||
path.join(__dirname, '../public/vendor/fontawesome/less')
|
||||
],
|
||||
source = '@import "./theme";\n@import "font-awesome";',
|
||||
x, numLESS, numCSS;
|
||||
|
||||
@@ -164,7 +164,7 @@ var fs = require('fs'),
|
||||
Plugins.staticDirs[pluginData.id] = path.join(pluginPath, pluginData.staticDir);
|
||||
}
|
||||
|
||||
for(key in pluginData.staticDirs) {
|
||||
for(var key in pluginData.staticDirs) {
|
||||
(function(mappedPath) {
|
||||
if (pluginData.staticDirs.hasOwnProperty(mappedPath)) {
|
||||
if (Plugins.staticDirs[mappedPath]) {
|
||||
|
||||
@@ -15,6 +15,7 @@ var path = require('path'),
|
||||
user = require('./user'),
|
||||
notifications = require('./notifications'),
|
||||
logger = require('./logger'),
|
||||
plugins = require('./plugins'),
|
||||
middleware = require('./middleware'),
|
||||
routes = require('./routes'),
|
||||
emitter = require('./emitter');
|
||||
@@ -86,6 +87,7 @@ if(nconf.get('ssl')) {
|
||||
winston.info('Using ports 80 and 443 is not recommend; use a proxy instead. See README.md');
|
||||
}
|
||||
|
||||
plugins.ready(function() {
|
||||
// Prepare js for minification/concatenation
|
||||
meta.js.prepare(function() {
|
||||
if (app.enabled('minification')) {
|
||||
@@ -97,6 +99,7 @@ if(nconf.get('ssl')) {
|
||||
|
||||
// Minify CSS
|
||||
meta.css.minify();
|
||||
});
|
||||
|
||||
module.exports.server = server;
|
||||
module.exports.init = function () {
|
||||
|
||||
Reference in New Issue
Block a user