diff --git a/lib/program.js b/lib/program.js index 6a8473d..5182b2f 100644 --- a/lib/program.js +++ b/lib/program.js @@ -2638,4 +2638,10 @@ exports = Program; exports.Program = Program; exports.Tput = Tput; +['Screen', 'Box', 'Text', 'List'].forEach(function(key) { + exports.__defineGetter__(key, function() { + return (exports._widget || (exports._widget = require('./widget')))[key]; + }); +}); + module.exports = exports; diff --git a/lib/high.js b/lib/widget.js similarity index 100% rename from lib/high.js rename to lib/widget.js diff --git a/lib/high-test.js b/test/widget.js similarity index 93% rename from lib/high-test.js rename to test/widget.js index 01309de..4778f0f 100644 --- a/lib/high-test.js +++ b/test/widget.js @@ -2,12 +2,6 @@ var blessed = require('blessed') , program = blessed() , screen; -var high = require('blessed/lib/high'); - -Object.keys(high).forEach(function(key) { - blessed[key] = high[key]; -}); - screen = new blessed.Screen({ program: program });