How to use the wilson/utils/module.importModule function in wilson

To help you get started, we’ve selected a few wilson examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chrisdickinson / wilson / lib / urls.js View on Github external
var getRoot = function() {
    if(arguments.callee._rootURLConf) return arguments.callee._rootURLConf;

    arguments.callee._rootURLConf = importModule(conf.settings.ROOT_URLCONF);
    return getRoot();
};
github chrisdickinson / wilson / lib / application.js View on Github external
AppDeclaration.prototype.load = function(name, options) {
    var app = importModule(this.loc).app,
        app_out = {};

    if(options) {
        Object.keys(app).forEach(function(item) {
            app_out[item] = app[item];
        });

        Object.keys(options).forEach(function(item) {
            app_out[item] = options[item];
        });

        app = new Application(app_out);
    }

    var app_instance = app.instantiate(name);
    for(var option in this.opts) {