add widget name aliases.

This commit is contained in:
Christopher Jeffrey 2015-07-17 03:11:21 -07:00
parent 89debe2577
commit 4fa34aa538
1 changed files with 11 additions and 0 deletions

View File

@ -47,3 +47,14 @@ widget.classes.forEach(function(name) {
var file = name.toLowerCase(); var file = name.toLowerCase();
widget[name] = widget[file] = require('./widgets/' + file); widget[name] = widget[file] = require('./widgets/' + file);
}); });
widget.aliases = {
'ListBar': 'Listbar',
'PNG': 'ANSIImage'
};
Object.keys(widget.aliases).forEach(function(key) {
var name = widget.aliases[key];
widget[key] = widget[name];
widget[key.toLowerCase()] = widget[name];
});