Beispiel #1
0
function init(param, options) {
    if (lo.isObject(param)) {
        helper.overrideDependency(param, imported_interface);
        isInitialized = true;
        return;
    }
    var override = lo.get(options, 'override');
    if(override){
        helper.overrideDependency(override, imported_interface);
    }

    if (isInitialized) return imported_interface;
    if (!param) param = '.';

    dir_list = helper.constructDirectoryList(helper.getDirectoryList(param), options);

    var parent = module.parent;
    var parentFile = parent.filename;
    var parentDir = path.dirname(parentFile);
    directory = path.resolve(parentDir, param);

    var req_list = req(directory, {
        recursive: true,
        excludeDirs: lo.get(options, 'exclude')
    });

    helper.loadObjects(imported_interface, req_list, dir_list);
    isInitialized = true;
    return imported_interface;
}
Beispiel #2
0
'use strict';

/**
 * This file is processed by webpack; edit it carefully!
 */

var requireDir = require('require-dir-all');

module.exports = requireDir('../../translations');