Add the next module to Orchard solution.
162520
function () {
            count++;

            // all modules have been added have been added.
            if (count === modules.length) {
                // check if solution file content needs to be updated.
                if (isDirty) {
                    writeSolutionFileContents();
                    return;
                }

                // slight delay to ensure future tasks can interact with module files.
                setTimeout(done, 500);
                return;
            }

            var moduleName = modules[count];
            
            // ignore directory when module doesn't contain .csproj file.
            if (!fs.existsSync(path.join(options.modules, moduleName, moduleName + '.csproj'))) {
                addNextModule();
                return;
            }

            helpers.getProjectGuid(path.join(options.modules, moduleName, moduleName + '.csproj'), function (moduleGuid) {
                // module already exists in the solution, move onto the next one.
                if (alreadyInSolution(moduleGuid)) {
                    addNextModule();
                    return;
                }

                var projectReference = '\r\nProject("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "' + moduleName + '", "Orchard.Web\\Modules\\' + moduleName + '\\' + moduleName + '.csproj", "' + moduleGuid + '"\r\nEndProject\r\n';
                var projectConfiguationPlatforms = '\t\t' + moduleGuid + '.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t' + moduleGuid + '.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t' + moduleGuid + '.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t' + moduleGuid + '.Release|Any CPU.Build.0 = Release|Any CPU\r\n';

                solutionFileContents = _s.insert(solutionFileContents, solutionFileContents.lastIndexOf('EndProject') + 10, projectReference)
                
                var sectionStart = solutionFileContents.indexOf("GlobalSection(ProjectConfigurationPlatforms)");
                var sectionEnd = sectionStart + solutionFileContents.substring(sectionStart).indexOf('EndGlobalSection');

                solutionFileContents = _s.insert(solutionFileContents, sectionEnd, projectConfiguationPlatforms);

                sectionStart = solutionFileContents.indexOf("GlobalSection(NestedProjects)");
                sectionEnd = sectionStart + solutionFileContents.substring(sectionStart).indexOf('EndGlobalSection');
                solutionFileContents = _s.insert(solutionFileContents, sectionEnd, '\t' + moduleGuid + ' = {' + SOLUTION_DIRECTORY_MODULES + '}\r\n\t');

                isDirty = true;

                addNextModule();
            });
        }
167362
def add(self, handler):
        ''' 

        '''
        self._handlers.append(handler)

        # make sure there is at most one static path
        static_paths = set(h.static_path() for h in self.handlers)
        static_paths.discard(None)
        if len(static_paths) > 1:
            raise RuntimeError("More than one static path requested for app: %r" % list(static_paths))
        elif len(static_paths) == 1:
            self._static_path = static_paths.pop()
        else:
            self._static_path = None
1003223
def visit_module(self, node, modname, modpath, package):
        """"""
        node, doc = self._get_doc(node)
        newnode = nodes.Module(
            name=modname,
            doc=doc,
            file=modpath,
            path=[modpath],
            package=package,
            parent=None,
        )
        newnode.postinit([self.visit(child, newnode) for child in node.body])
        return newnode
919277
def add_options(cls, manager):
        """"""
        kw = {}
        if flake8.__version__ >= '3.0.0':
            kw['parse_from_config'] = True
        manager.add_option(
            "--known-modules",
            action='store',
            default="",
            help=(
                "User defined mapping between a project name and a list of"
                " provided modules. For example: ``--known-modules=project:"
                "[Project],extra-project:[extras,utilities]``."
            ),
            **kw
        )
1282731
def add(entry_point, all_entry_points, auto_write, scripts_path):
    ''''''

    click.echo()
    if not entry_point and not all_entry_points:
        raise click.UsageError(
            'Missing required option: --entry_point or --all_entry_points'
        )
    if not os.path.exists('setup.py'):
        raise click.UsageError('No setup.py found.')

    setup_data = parse_setup('setup.py')
    console_scripts = get_console_scripts(setup_data)

    scripts = []
    if all_entry_points and console_scripts:

        # Make sure our entry points start with py
        for entry in console_scripts:
            if not entry.startswith('py'):
                click.echo('Your python entry_points must start with py.')
                click.echo('Found: ' + entry)
                raise click.Abort()

        for entry in console_scripts:
            click.echo('Found entry_point: ' + entry)
            py_entry_point = entry
            entry_point = entry[2:]
            more_scripts = copy_templates(
                entry_point,
                py_entry_point,
                auto_write,
                scripts_path
            )

            for script in more_scripts:
                click.echo('    Created ' + script)

            scripts.extend(more_scripts)

    elif entry_point:
        if not entry_point.startswith('py'):
            click.echo('Your python entry_points must start with py.')
            raise click.Abort()
        if entry_point not in console_scripts:
            click.echo(entry_point + ' not found in your setups entry_points')
            click.echo('You will need to add it afterward if you continue...')
            click.echo('')
            click.confirm('Do you want to continue?', abort=True)

        click.echo('\nCreating scripts for: ' + entry_point)
        py_entry_point = entry_point
        entry_point = entry_point[2:]
        more_scripts = copy_templates(
            entry_point,
            py_entry_point,
            auto_write,
            scripts_path
        )

        for script in more_scripts:
            click.echo('    Created ' + script)

        scripts.extend(more_scripts)

    click.echo('\n\nAdd the following section to your package setup:\n')
    click.echo('scripts=[')
    for script in scripts:
        click.echo("    '{}',".format(script))
    click.echo('],')
495532
def add_module(  # noqa: C901
        self,
        module,
        module_or_package_name,
        local_names,
        import_alias_mapping,
        is_init=False,
        from_from=False,
        from_fdid=False
    ):
        
        module_path = module[1]

        parent_definitions = self.module_definitions_stack[-1]
        # Here, in `visit_Import` and in `visit_ImportFrom` are the only places the `import_alias_mapping` is updated
        parent_definitions.import_alias_mapping.update(import_alias_mapping)
        parent_definitions.import_names = local_names

        new_module_definitions = ModuleDefinitions(local_names, module_or_package_name)
        new_module_definitions.is_init = is_init
        self.module_definitions_stack.append(new_module_definitions)

        # Analyse the file
        self.filenames.append(module_path)
        self.local_modules = get_directory_modules(module_path) if self._allow_local_modules else []
        tree = generate_ast(module_path)

        # module[0] is None during e.g. "from . import foo", so we must str()
        self.nodes.append(EntryOrExitNode('Module Entry ' + str(module[0])))
        self.visit(tree)
        exit_node = self.append_node(EntryOrExitNode('Module Exit ' + str(module[0])))

        # Done analysing, pop the module off
        self.module_definitions_stack.pop()
        self.filenames.pop()

        if new_module_definitions.is_init:
            for def_ in new_module_definitions.definitions:
                module_def_alias = handle_aliases_in_init_files(
                    def_.name,
                    new_module_definitions.import_alias_mapping
                )
                parent_def_alias = handle_aliases_in_init_files(
                    def_.name,
                    parent_definitions.import_alias_mapping
                )
                # They should never both be set
                assert not (module_def_alias and parent_def_alias)

                def_name = def_.name
                if parent_def_alias:
                    def_name = parent_def_alias
                if module_def_alias:
                    def_name = module_def_alias

                local_definitions = self.module_definitions_stack[-1]
                if local_definitions != parent_definitions:
                    raise
                if not isinstance(module_or_package_name, str):
                    module_or_package_name = module_or_package_name.name

                if module_or_package_name:
                    if from_from:
                        qualified_name = def_name

                        if from_fdid:
                            alias = handle_fdid_aliases(module_or_package_name, import_alias_mapping)
                            if alias:
                                module_or_package_name = alias
                            parent_definition = ModuleDefinition(
                                parent_definitions,
                                qualified_name,
                                module_or_package_name,
                                self.filenames[-1]
                            )
                        else:
                            parent_definition = ModuleDefinition(
                                parent_definitions,
                                qualified_name,
                                None,
                                self.filenames[-1]
                            )
                    else:
                        qualified_name = module_or_package_name + '.' + def_name
                        parent_definition = ModuleDefinition(
                            parent_definitions,
                            qualified_name,
                            parent_definitions.module_name,
                            self.filenames[-1]
                        )
                    parent_definition.node = def_.node
                    parent_definitions.definitions.append(parent_definition)
                else:
                    parent_definition = ModuleDefinition(
                        parent_definitions,
                        def_name,
                        parent_definitions.module_name,
                        self.filenames[-1]
                    )
                    parent_definition.node = def_.node
                    parent_definitions.definitions.append(parent_definition)

        return exit_node
845572
function addRaw() {
	openapi.tags = openapi.tags.concat(raw.tags);
	for (var p in raw.paths) {
		openapi.paths[p] = raw.paths[p];
		openapi.paths[p].get.responses['200'].description = 'Nitro response';
		openapi.paths[p].get.responses['200'].content = {};
		openapi.paths[p].get.responses['200'].content['application/json'] = {};
		openapi.paths[p].get.responses['200'].content['application/json'].schema = {};
		openapi.paths[p].get.responses['200'].content['application/json'].schema.$ref = '#/components/schemas/nitro';
		openapi.paths[p].get.responses['200'].content['application/xml'] = clone(openapi.paths[p].get.responses['200'].content['application/json']);
	}
}
715195
def add_after(self):
        """"""
        idx = self._container.structure.index(self)
        return BlockBuilder(self._container, idx+1)
343119
def add(**kwargs):
  '''  '''

  output, err = cli_syncthing_adapter.add(**kwargs)
  click.echo("%s" % output, err=err)
15340
function addModulesToPackageJson(externalModules, packageJson, pathToPackageRoot) {
  _.forEach(externalModules, externalModule => {
    const splitModule = _.split(externalModule, '@');
    // If we have a scoped module we have to re-add the @
    if (_.startsWith(externalModule, '@')) {
      splitModule.splice(0, 1);
      splitModule[0] = '@' + splitModule[0];
    }
    let moduleVersion = _.join(_.tail(splitModule), '@');
    // We have to rebase file references to the target package.json
    moduleVersion = rebaseFileReferences(pathToPackageRoot, moduleVersion);
    packageJson.dependencies = packageJson.dependencies || {};
    packageJson.dependencies[_.first(splitModule)] = moduleVersion;
  });
}
827057
public function add()
    {
        if($moduleMiddleware = $this->module->middleware())
        {
            $middleware = $this->load();
            $middleware = array_merge($middleware,$moduleMiddleware);
            return $this->set($middleware);
        }
        return true;
    }
468163
def add_robot(self, controller):
        """"""

        # connect to the controller
        # -> this is to support module robots
        controller.on_mode_change(self._on_robot_mode_change)
        self.robots.append(controller)
210147
def add_subproject(self, fname, conf_path):
        """"""
        config = Config(conf_file=conf_path)
        proj = Project(self.app,
                       dependency_map=self.dependency_map)
        proj.parse_name_from_config(config)
        proj.parse_config(config)
        proj.setup()
        self.subprojects[fname] = proj
811765
def add(self, spec):
        
        for limit in spec.limit_to:
            if limit not in self.limit_to:
                self.limit_to.append(limit)
51348
public void addModuleDir(final String moduleDir) {
        if (moduleDir == null) {
            throw LauncherMessages.MESSAGES.nullParam("moduleDir");
        }
        // Validate the path
        final Path path = Paths.get(moduleDir).normalize();
        modulesDirs.add(path.toString());
    }
1124220
def add(addon, dev, interactive):
    
    application = get_current_application()
    application.add(
        addon,
        dev=dev,
        interactive=interactive
    )
1172467
def add(self, sim, module, package=None):
        
        super(Simulations, self).add(sim, module, package)
        # only update layer info if it is missing!
        if sim not in self.layer:
            # copy simulation source parameters to :attr:`Layer.layer`
            self.layer[sim] = {'module': module, 'package': package}