install script tweaks so vanilla is default

This commit is contained in:
Julian Lam
2013-10-19 17:41:26 -04:00
parent 9166c82dc2
commit c1f47f536d
2 changed files with 20 additions and 1 deletions

View File

@@ -144,8 +144,9 @@ var express = require('express'),
},
function(next) {
RDB.hmget('config', 'theme:type', 'theme:id', function(err, themeData) {
var themeId = (themeData[1] || 'nodebb-theme-vanilla');
if (!themeData[0] || themeData[0] === 'local') {
var themeId = (themeData[1] || 'nodebb-theme-vanilla');
if (process.env.NODE_ENV === 'development') winston.info('[themes] Using theme ' + themeId);
app.use(require('less-middleware')({
@@ -155,6 +156,18 @@ var express = require('express'),
yuicompress: true
}));
next();
} else {
// If not using a local theme (bootswatch, etc), drop back to vanilla
if (process.env.NODE_ENV === 'development') winston.info('[themes] Using theme ' + themeId);
app.use(require('less-middleware')({
src: path.join(__dirname, '../node_modules/nodebb-theme-vanilla'),
dest: path.join(__dirname, '../public/css'),
prefix: nconf.get('relative_path') + '/css',
yuicompress: true
}));
next();
}
});