+ Start work on MenuView & friends

* connect.js no longer a module. Part of initial connection always
* Cleaner & expandable BBS init
* Better theme handling
This commit is contained in:
Bryan Ashby 2014-10-30 22:59:21 -06:00
parent 14a321de2f
commit c3aa4c44e2
8 changed files with 96 additions and 64 deletions

View file

@ -33,15 +33,14 @@ function getThemeInfo(themeID, cb) {
var availableThemes = {};
function initAvailableThemes(cb) {
// lazy init
async.waterfall(
[
function getDir(callback) {
fs.readdir(Config.paths.themes, function onReadDir(err, files) {
fs.readdir(Config.paths.themes, function onReadDir(err, files) {
callback(err, files);
});
},
function filterFiles(files, callback) {
function filterFiles(files, callback) {
var filtered = files.filter(function onFilter(file) {
return fs.statSync(paths.join(Config.paths.themes, file)).isDirectory();
});
@ -56,9 +55,9 @@ function initAvailableThemes(cb) {
}
availableThemes[themeId] = info;
}
callback(null);
});
});
callback(null);
}
],
function onComplete(err) {