Evaluate the require_config.js file and return the configuration.
340777
function readRequireConfig( file ) {
   'use strict';
   var config = fs.readFileSync( file );
   /*jshint -W054*/
   var evaluate = new Function( 'var window = this;' + config + '; return require || window.require;' );
   return evaluate.call( {} );
}
348992
def read(config_file, configspec, server_mode=False, default_section='default_settings', list_values=True):
    '''
    
    '''
#    configspec = ConfigObj(path.join(path.abspath(path.dirname(__file__)), configspec),
#                           encoding='UTF8',
#                           interpolation='Template',
#                           list_values=False,
#                           _inspec=True)
    config = ConfigObj(config_file,
                       configspec=path.join(path.abspath(path.dirname(__file__)),
                                            configspec),
                                            list_values=list_values)
    validation = config.validate(validate.Validator(), preserve_errors=True)

    if validation == True:
        config = dict(config)
        for section in config:
            if section != default_section:
                if server_mode: # When it's a servers config file, retrieve the correct fqdn
                    config[section]['availability'] = True
                    if config[section]['custom_fqdn'] == None:
                        config[section]['custom_fqdn'] = socket.getfqdn()
                for option in config[section]:  # retrieve default configuration for missing values
                    if config[section][option] == None:
                        config[section][option] = config[default_section][option]

        del(config[default_section])

        return config
    else:
        raise ConfiguratorException(config_file, validation)
1172864
function loadJspmConfig(opts) {
  sh.echo('Loading jspm config...');

  return new Promise(resolve => {
    const loader = new jspm.Loader();

    opts.config(loader);
    resolve(loader);
  });
}
497283
def _read_config_file(self):
        """"""

        try:
            with open(self.config, 'r') as f:
                config_data = json.load(f)
        except FileNotFoundError:
            config_data = {}

        return config_data
962604
function loadJsFile(file) {
    var modId = path.basename(file).slice(0, -3);
    var mod = require(file);
    modulePath[modId] = file;
    mod.__id = modId;
    return mod;
}
22847
def js():
    ""
    return os.path.join(os.path.dirname(os.path.abspath(__file__)), 'js')
1115015
def get_config():
    """"""
    # these strings are filled in when 'setup.py versioneer' creates
    # _version.py
    cfg = VersioneerConfig()
    cfg.VCS = "git"
    cfg.style = "pep440-post"
    cfg.tag_prefix = ""
    cfg.parentdir_prefix = "None"
    cfg.versionfile_source = "canmatrix/_version.py"
    cfg.verbose = False
    return cfg
1253771
def load(self):
        """"""
        try:
            with open(self.config_file) as configfile:
                self.config = yaml.load(configfile)
        except TypeError:
            # no config file (use environment variables)
            pass
        if self.config:
            self.prefix = self.config.get('config_prefix', None)
        if not self.prefix:
            if os.getenv(self.config_prefix):
                self.prefix = os.getenv(self.config_prefix)
            else:
                for path in [
                    os.path.join(self.basepath, self.default_file),
                    os.path.join(self.config_root, self.default_file)
                ]:
                    if os.path.exists(path):
                        with open(path) as conf:
                            config = yaml.load(conf)
                            prefix = config.get(
                                self.config_prefix.lower(), None
                            )
                            if prefix:
                                self.prefix = prefix
                                break
356198
function loadConfig(defaultConfig, opts)
{
    let config = {},
        userConfig,
        warnAboutMissingConfig = false,
        configPath;

    if(!opts.no_config_file) {
        if(opts.config_file) {
            // We only warn about a config file missing if they explicitly specified
            // it on the command line.
            warnAboutMissingConfig = true;
            configPath = opts.config_file;
        }
        else {
            /* istanbul ignore next */
            configPath = process.env.JUTIL_CONFIG_PATH || '~/.jutil/config';
        }
    }

    utils.shallowCopy(defaultConfig, config);

    if(!configPath)
        return config;

    try {
        let realConfigPath = utils.resolvePath(configPath);
        let configFile = utils.loadFile(realConfigPath, false);
        let configSandbox = vm.createContext({
            console: console,
            out: console.log,
            process: process,
            require: require
        });
        
        vm.runInContext(configFile, configSandbox, { 'filename': realConfigPath });
        userConfig = configSandbox.config;
    }
    catch(exc) {
        // It's fine if we didn't find a config file; we'll use the defaults
        if(exc.code == 'ENOENT') {
            if(warnAboutMissingConfig) {
                console.warn('Warning: unable to load configuration file "' + configPath + '"');
            }

            return config;
        }
        else {
            console.error('Error loading configuration file: ' + exc);
            process.exit(1);
        }
    }

    if(userConfig) {
        // Validate config file and merge it with the defaults.
        
        copyStringArraySetting(userConfig, config, 'moduleDirectories');
        copyFunctionSetting(userConfig, config, 'prettyPrinter', 2);
        copyFunctionSetting(userConfig, config, 'unprettyPrinter', 2);
        copyFunctionSetting(userConfig, config, 'inputParser', 3);
        copyBooleanSetting(userConfig, config, 'alwaysSortKeys');
        copyBooleanSetting(userConfig, config, 'alwaysPrettyPrint');
        copyEnumSetting(userConfig, config, 'color', ['off', 'force', 'auto', 'auto+pager']);
        copyBooleanSetting(userConfig, config, 'alwaysAutoUnwrap');
        copyStringArraySetting(userConfig, config, 'autoUnwrapProperties');
        copyFunctionSetting(userConfig, config, 'autoUnwrapper', 2);
        copyBooleanSetting(userConfig, config, 'disableWithClause');
        copyBooleanSetting(userConfig, config, 'disableSmartOutput');
        
        if(userConfig.hasOwnProperty('prettyPrintIndent')) {
            switch(typeof userConfig.prettyPrintIndent) {
                case 'string':
                case 'number':
                    config.prettyPrintIndent = userConfig.prettyPrintIndent;
                    break;
                
                default:
                    console.warn('Warning: prettyPrintIndent property in config file must be a number or string; ignoring the setting');
            }
        }
        
        // Copy over any other properties from the config file
        for(let propName in userConfig) {
            if(userConfig.hasOwnProperty(propName) && !defaultConfig.hasOwnProperty(propName))
                config[propName] = userConfig[propName];
        }
    }
    else
        console.warn('Warning: config file must assign to the global "config" var; ignoring the file');
    
    return config;
}
14994
def load_configuration(conf_path):
    
    with open(conf_path) as f:
        conf_dict = yaml.load(f)
    validate_config(conf_dict)
    return conf_dict
1058126
function loadConfiguration () {
    if (!fs.existsSync(CONFIG_FILE)) {
        winston.info('No previous configuration found, creating one');
        fs.writeFileSync(CONFIG_FILE, fs.readFileSync(SAMPLE_FILE));
    }

    return yaml.safeLoad(fs.readFileSync(CONFIG_FILE));
}
1024341
function loadConfig(filename) {
  //Does our consumer have a valid .mitto?
  var mittoObject = _loadMitto();
  //Is it in a valid format?
  mittoObject = _validateMitto(mittoObject);

  //Does our consumer's consumer have a config of 'filename'?
  var configObject = _findFile(filename);
  //Is it in a valid format as prescribed by our consumer's .mitto?
  return _validateConfig(configObject, mittoObject);
}
1237458
def load_config(deploy_dir):
    '''
    
    '''

    config = Config()
    config_filename = path.join(deploy_dir, 'config.py')

    if path.exists(config_filename):
        extract_file_config(config_filename, config)

        # Now execute the file to trigger loading of any hooks
        exec_file(config_filename)

    return config
447476
function getConfig(config) {
    // Read a RESTBase configuration from a (optional) path argument, an (optional) CONFIG
    // env var, or from /etc/restbase/config.yaml
    var conf;

    if (config) {
        conf = config;
    } else if (process.env.CONFIG) {
        conf = process.env.CONFIG;
    } else {
        conf = '/etc/restbase/config.yaml';
    }

    var confObj = yaml.safeLoad(fs.readFileSync(conf));
    return confObj.default_project['x-modules'][0].options.table;
}
595876
function loadConfig(path) {
    var glob = require('glob');
    var object = {};
    var key;

    glob.sync('*', {cwd: path}).forEach(function(option) {
      key = option.replace(/\.js$/,'');
      object[key] = require(path + option);
    });

    return object;
  }
562830
function parseConfig(book) {
    var fs = book.getFS();
    var config = book.getConfig();

    return Promise.some(CONFIG_FILES, function(filename) {
        // Is this file ignored?
        if (book.isFileIgnored(filename)) {
            return;
        }

        // Try loading it
        return fs.loadAsObject(filename)
        .then(function(cfg) {
            return fs.statFile(filename)
            .then(function(file) {
                return {
                    file: file,
                    values: cfg
                };
            });
        })
        .fail(function(err) {
            if (err.code != 'MODULE_NOT_FOUND') throw(err);
            else return Promise(false);
        });
    })

    .then(function(result) {
        var values = result? result.values : {};
        values = validateConfig(values);

        // Set the file
        if (result.file) {
            config = config.setFile(result.file);
        }

        // Merge with old values
        config = config.mergeValues(values);

        return book.setConfig(config);
    });
}
52142
function loadConfigFile(dist, paths, options, callback) {
        if (options.config) {
            fs.readFile(options.config, {encoding: 'utf8'}, function(err, contents) {
                if (err) {
                    callback(err);
                    return;
                }
                
                var config = ini.parse(contents);

                if (config && config.default) {
                    options.accessKeyId = config.default.access_key;
                    options.secretAccessKey = config.default.secret_key;
                }
                if (!options.secretAccessKey || !options.accessKeyId) {
                    callback("Config file missing access_key or secret_key");
                    return;
                }

                invalidate(dist, paths, options, callback);
            });
        } else {
            invalidate(dist, paths, options, callback);
        }
    }