add widget name aliases.
This commit is contained in:
parent
89debe2577
commit
4fa34aa538
|
@ -47,3 +47,14 @@ widget.classes.forEach(function(name) {
|
|||
var file = name.toLowerCase();
|
||||
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];
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue