@function initDir

initialize global dir config by merging module configs

@param {object} config

@throws {Error}
320542
function initComponents (config) {
    // check if immutable-app-component module is loaded
    var hasImmutableAppComponent = defined(config.modules['immutable-app-component'])
    // get components directory
    var dirs = getDir(config, 'components')
    // load component definitions from each directory
    _.each(dirs, dir => initComponentsDir(config, dir))
    // if there are components but component module is not loaded throw error
    if (_.keys(config.components).length > 0 && !hasImmutableAppComponent) {
        throw new Error('immutable-app-component not loaded')
    }
    // create new component instances from definitions
    _.each(config.components, (component, name) => {
        config.components[name] = new ImmutableCoreComponent(component)
    })
}
1190766
function config (args) {
    // iterate over args merging configuration to either the module or the
    // global configuration
    _.each(args, (val, key) => {
        // configuration to modify
        var config
        // create new object to merge into config
        var merge = {}
        // set key and value to merge
        merge[key] = val
        // if this is a global config option then modify global config
        if (key in defaultGlobalConfig) {
            // merge args over config with custom handler to merge arrays
            _.mergeWith(immutableApp, merge, mergeArrays)
        }
        // if this is module config then set config on module instance
        else if (key in defaultModuleConfig) {
            // merge args over config with custom handler to merge arrays
            _.mergeWith(this, merge, mergeArrays)
        }
        // throw error on invalid configuration option
        else {
            throw new Error('invalid config option '+key)
        }
    })
    // return module
    return this
}
744031
function (rootdir, configData, platform) {
        var configFiles = lib.getConfigFilesByTargetAndParent(rootdir, platform),
            type = 'configFile';

        for (var key in configFiles) {
            if (configFiles.hasOwnProperty(key)) {
                var configFile = configFiles[key];

                var keyParts = key.split('|');
                var target = keyParts[0];
                var parent = keyParts[1];
                var items = configData[target] || [];

                configFile.getchildren().forEach(function (element) {
                    items.push({
                        parent: parent,
                        type: type,
                        destination: element.tag,
                        data: element
                    });
                });

                configData[target] = items;
            }
        }
    }
576157
function INIT(config) {
  if (__init) return;

  CONF = config

  if (!! CONF.redis) {
    // TODO: avoid this hassle if https://github.com/LearnBoost/kue/issues/54 
    //       ever gets fixed
    reds.createClient = function() {
      var client = redis.createClient(CONF.redis.port, CONF.redis.host)
      client.auth(CONF.redis.pass)
      return client
    }

    kue.redis.createClient = reds.createClient
  }

  JOBS = kue.createQueue()
  RED = JOBS.client

  JOBS.promote()

  __init = true
}
606584
function initConfig(obj) {
  Object.keys(obj).forEach(item => {
    if (!process.env[item]) {
      process.env[item] = obj[item];
    }
  });
}
329297
function init(loader) {
  var loaderConfig = loaderUtils.getLoaderConfig(loader, 'web3Loader');
  web3 = require('./lib/web3')(loaderConfig.provider);
  config = mergeConfig(loaderConfig);
  isDebug = loader.debug;
}
863214
def initialize_configs
      config_dir = root.join(DEFAULT_CONFIG_DIR_NAME)

      CONFIGS.each do |name, klass|
        instance_variable_set(:"@#{name}", klass.new(config_dir))
      end
    end
910203
function initModule(modName, mod) {
        console.log("Initialising "+modName);
        if (mod.init !== undefined)
          mod.init();
      }
1293195
function init(opt_config) {
  if (singleton) {
    return;
  }
  var config = objects.clone(defaultConfig);
  if (opt_config) {
    objects.merge(config, opt_config);
  }

  singleton = new YouTubeModal(config);
}
1135391
function init (root, storage) {
  // calling path
  const calling = path.dirname(getCallingScript())

  // root path
  root = !root || root === '.' || root === './'
    ? root = calling
    : path.isAbsolute(root)
      ? root
      : path.normalize(calling + root)
  sketchpad.root = root.replace(/\/*$/, '/')

  // settings path
  const settingsFolder = path.normalize(sketchpad.root + (storage || 'storage') + '/sketchpad/')
  settingsFile = settingsFolder + 'settings.json'

  // check for settings
  if (!fs.existsSync(settingsFolder)) {
    return error('Folder "' +settingsFolder+ '" not found')
  }
  if (!fs.existsSync(settingsFile)) {
    return error('File "settings.json" not found in "' +settingsFolder+ '"')
  }

  // load settings
  sketchpad.load()
  return this
}
998770
function(params) {
			$.extend(globalConfig, params || {});

			this.startAll(document.documentElement);

			this.fire('init');
			initialized = true;
		}
790596
function init(config) {
    var promises = [];

    if (config.redis) {
        _.each(config.redis.dbs, function (idx, name) {
            promises.push(
                connectToRedis(idx, config.redis)
                    .then(function (remoteCache) {
                        caches[name] = wrapRemoteCache(remoteCache);
                        return true;
                    })
            );
        });
    }

    // initialization done once all connections established
    return Q.all(promises)
        .then(function () {
            return config;
        });
}
1105439
function(config) {
			if (initialized) {
				error(new Error('Cannot set global configuration after application initialization'));
				return;
			}

			for (var prop in config) {
				if (config.hasOwnProperty(prop)) {
					globalConfig[prop] = config[prop];
				}
			}
		}
1326546
protected function initializeConfigs()
    {
        $this->mergeConfigFrom(static::getConfigPath(), static::getConfigRootKeyName());

        $this->publishes([
            realpath(static::getConfigPath()) => config_path(basename(static::getConfigPath())),
        ], 'config');
    }
1204543
def init(path = Dir.pwd, _options = {})
      # FIXME: for travis test: ensure the global git configurations
      # 'user.email' and 'user.name' are set
      [ 'user.name', 'user.email' ].each do |userconf|
        next unless MiniGit[userconf].nil?
        warn "The Git global configuration '#{userconf}' is not set so"
        warn "you should *seriously* consider setting them by running\n\t git config --global #{userconf} 'your_#{userconf.sub(/\./, '_')}'"
        default_val = ENV['USER']
        default_val += '@domain.org' if userconf =~ /email/
        warn "Now putting a default value '#{default_val}' you could change later on"
        run %(
                       git config --global #{userconf} "#{default_val}"
                  )
        #MiniGit[userconf] = default_val
      end
      exit_status = 1
      Dir.mkdir( path ) unless Dir.exist?( path )
      Dir.chdir( path ) do
        execute "git init" unless FalkorLib.config.debug
        exit_status = $?.to_i
      end
      # #puts "#init #{path}"
      # Dir.chdir( "#{path}" ) do
      #     %x[ pwd && git init ] unless FalkorLib.config.debug
      # end
      exit_status
    end
1107816
function init(opt_config) {
  if (modalInstance) {
    return;
  }
  var config = objects.clone(defaultConfig);
  if (opt_config) {
    objects.merge(config, opt_config);
  }

  modalInstance = new Modal(config);
}
549490
function init(cb) {
	Storage.read(goblin.config.files.db, {}, function(err, db) {
		if (err) {
			return cb(err);
		}

		goblin.db = db;
		cb();
	})
}