mangonel - Main constructor for the application

@param {array} [modules=[]]
349696
function Mangonel (modules = []) {
  const getLaunchersByName = (modules, name) =>
    modules.filter(m => m.name === name)

  const getFirstLauncher = (...args) =>
    modules.filter(m => m.platforms.filter(p => p === args[1]).length > 0)[0]

  return {
    /**
   *
   *
   * @param {function} emulator launcher modules
   * @param {Object} [launcher={}] launcher object
   * @param {Object} [options={}] options object
   * @returns {int} processId
   */
    launch (software, launcher = {}, settings = {}, options = {}) {
      const command = getFirstLauncher(modules, software.platform).buildCommand(
        software.file,
        launcher,
        settings
      )

      return execute(command, options)
    },
    modules
  }
}
422771
def app_loader(app, entry_points=None, modules=None):
    
    _loader(app, lambda ext: ext(app), entry_points=entry_points,
            modules=modules)
53605
function (require) {
        var seed = Math.random();
        var config = require('./egg/config');

        var modules = [];
        for (var i = 0; i < config.length; i++) {
            var egg = config[i];
            if (egg.ratio >= seed) {
                modules.push('common/egg/' + egg.name);
            }
        }

        if (modules.length) {
            window.require(
                modules,
                function () {
                    for (var i = 0; i < arguments.length; i++) {
                        var egg = arguments[i];
                        if (typeof egg.enable === 'function') {
                            egg.enable();
                        }
                    }
                }
            );
        }
    }
648524
function(module) {
		var name = module.$modname;
		if (!this.$hasModule(name)) {
			this._modules.push(module);
			if (gui.Type.isFunction(module.oncontextinitialize)) {
				module.oncontextinitialize(window);
			}
			if (gui.Type.isFunction(module.onrun)) {
				module.onrun();
			}
		} else {
			throw new Error(name + ' loaded twice?');
		}
		return module;
	}
249327
def main_func(args=None):
    
    # we have to initialize a gui even if we dont need one right now.
    # as soon as you call maya.standalone.initialize(), a QApplication
    # with type Tty is created. This is the type for conosle apps.
    # Because i have not found a way to replace that, we just init the gui.
    guimain.init_gui()

    main.init()
    launcher = Launcher()
    parsed, unknown = launcher.parse_args(args)
    parsed.func(parsed, unknown)
1361302
function compile() {
    swig.log.info('', 'Compiling module list...');

    const modulesPath = path.join(swig.temp, '/**/node_modules/@gilt-tech');
    const modPaths = glob.sync(modulesPath);
    let dirs;

    swig.log.verbose(`[compile] searching: ${modulesPath}`);
    swig.log.verbose(`[compile] found module directories: ${modPaths.length}`);

    modPaths.forEach((modPath) => {
      swig.log.verbose(`[compile] compiling: ${modPath}`);

      dirs = fs.readdirSync(modPath);

      _.each(dirs, (dir) => {
        const dirPath = path.join(modPath, dir);
        if (fs.existsSync(dirPath) && fs.lstatSync(dirPath).isDirectory()) {
          azModules.push({ name: dir, path: dirPath });
        }
      });
    });

    // group by basename, and take the 'topmost' module in the hierarchy
    azModules = _.groupBy(azModules, module => path.basename(module.path));

    // pull out the 'winning' module path, for each module
    azModules = _.map(azModules, (modulesList) => {
      // the modules arg will be [{ name:, path: }, ...]

      if (modulesList.length === 1) {
        return modulesList[0];
      }

      // glob will almost always return the right order,
      // but let's assert this to be safe. we can spare the cycles.
      return _.sortBy(modulesList, module => module.path.length)[0];
    });

    // and now we pretty sort a-z for various output
    // we dont reset azModules to the sorted array because we need it dirty for deps.less
    _.sortBy(azModules, mod => mod.name).forEach((mod) => {
      modules[mod.name] = mod.path;
    });

    swig.log.verbose('[compile] sorted modules: ');
    swig.log.verbose(modules);
  }
1263203
function initModule(forge) {

forge.md = forge.md || {};
forge.md.algorithms = {
  md5: forge.md5,
  sha1: forge.sha1,
  sha256: forge.sha256
};
forge.md.md5 = forge.md5;
forge.md.sha1 = forge.sha1;
forge.md.sha256 = forge.sha256;

}
1148249
function initModule(forge) {

forge.mgf = forge.mgf || {};
forge.mgf.mgf1 = forge.mgf1;

}
1242015
function initModule (config, module) {
    // recursively load app dir(s)
    _.each(module.dir.app, appDir => {
        initAppDir(config, module, appDir)
    })
}
407202
function workFn() {
      if (currentSpec.$injector) {
        throw Error('Injector already created, can not register a module!');
      } else {
        var modules = currentSpec.$modules || (currentSpec.$modules = []);
        angular.forEach(moduleFns, function(module) {
          modules.push(module);
        });
      }
    }
96008
function loadModule(modulePath) {
    // Setup environment
    if (loadedModule === undefined || loadedModulePath != modulePath) {
        loadedModule = require(modulePath);
        loadedModulePath = modulePath;
        
        return Q(loadedModule);        
    } else {
        return Q(loadedModule);
    }
}
931087
def include(modules)
      modules = Array(modules)

      modules.each { |m| self.class.include m }
    end
261890
function main() {
    var program = require('commander')
    program.usage('FILE.d.ts... [options]')
    program.commandHelp = function() { return "  Convert *.d.ts files to TypeScript Declaration Core\n" }
    program.option('--pretty', 'Print pretty JSON, for human inspection')
        .option('--silent', 'Print nothing')
        .option('--lib', "Include TypeScript\'s lib.d.ts file")
    program.parse(process.argv)

    if (program.args.length < 1) {
        program.help()
    }

    var inputs = program.args.map(function(file) {
        return {
            file: file,
            text: fs.readFileSync(file, 'utf8')
        }
    })
    if (program.lib) {
        inputs.unshift({
            file: ">lib.d.ts",
            text: fs.readFileSync(__dirname + '/lib/lib.d.ts', 'utf8')
        })
    }
    var json = convert(inputs)
    if (program.silent)
        {}
    else if (program.pretty)
        console.log(util.inspect(json, {depth:null}))
    else
        console.log(JSON.stringify(json))
}
200854
function(callback) {
            async.map(modules, function(module, callback) {
                callback && callback(
                    null,
                    {
                        name: module,
                        path: process.cwd() + '/modules/' +
                              module + '/controllers/'
                    }
                );
            }, callback);
        }
814031
function(parentModule, kbox, id, app, callback) {

  if (typeof callback === 'undefined' && typeof app === 'function') {
    callback = app;
    app = undefined;
  }

  // Try to load module from node_module directories.
  return requireFromNodeModules(parentModule, id)
  // If module was not found in node_module directories, try to load
  // from other directories.
  .then(function(mod) {
    if (mod) {
      return mod;
    } else {
      return requireFromOtherDirs(kbox, id, app);
    }
  })
  // Return.
  .nodeify(callback);

}
739410
function intersectModules(modulesA, modulesB) {
    const intersection = [];
    for (const module of modulesA) {
      if (modulesB.includes(module)) {
        intersection.push(module);
      }
    }
    return intersection;
  }
816576
public <T extends SourceFile> void initModules(
      List<T> externs, List<JSModule> modules, CompilerOptions options) {
    initOptions(options);

    checkFirstModule(modules);

    this.externs = makeExternInputs(externs);

    // Generate the module graph, and report any errors in the module specification as errors.
    try {
      this.moduleGraph = new JSModuleGraph(modules);
    } catch (JSModuleGraph.ModuleDependenceException e) {
      // problems with the module format.  Report as an error.  The
      // message gives all details.
      report(JSError.make(MODULE_DEPENDENCY_ERROR,
          e.getModule().getName(), e.getDependentModule().getName()));
      return;
    }

    // Creating the module graph can move weak source around, and end up with empty modules.
    fillEmptyModules(getModules());

    this.commentsPerFile = new ConcurrentHashMap<>(moduleGraph.getInputCount());
    initBasedOnOptions();

    initInputsByIdMap();

    initAST();
  }