installs the node modules via npm install one at a time
167182
function installNodeModules(modules, callback) {
    // base case
    if (modules.length <= 0) {
      return callback();
    }

    // install one at a time
    const module = modules.pop();
    console.log(`BRANCH SDK: Installing node dependency ${module}`);

    const install = `npm install --prefix ./plugins/${SDK} -D ${module}`;
    exec(install, (err, stdout, stderr) => {
      // handle error
      if (err) {
        throw new Error(
          `BRANCH SDK: Failed to install Branch node dependency ${module}. Docs https://goo.gl/GijGKP`
        );
      } else {
        // next module
        installNodeModules(modules, callback);
      }
    });
  }
327673
function installGrunt(answers) {
  console.log(chalk.gray("Installing 'grunt-cli' globally..."));
  installPackage('grunt-cli', true, answers.sudo);

  console.log(chalk.gray("Installing 'grunt' locally..."));
  installPackage('grunt', false, answers.sudo, 'save-dev');
}
80625
public function install()
    {
        $this->updatePackages();
        $this->updateBootstrapping();

        $this->filesystem->deleteDirectory(resource_path('assets/js/components'));
        $this->filesystem->delete(resource_path('assets/sass/_variables.scss'));
        $this->filesystem->deleteDirectory(base_path('node_modules'));
        $this->filesystem->deleteDirectory(public_path('css'));
        $this->filesystem->deleteDirectory(public_path('js'));
    }
1258001
function install(destination, prg, callback) {
  prompt.start();

  prompt.message = ':'.white.bold.bgBlack;
  prompt.delimiter = ': '.white.bold.bgBlack;

  var schema = {
    properties: {
      appName: {
        description: 'Application name'.white.bold.bgBlack,
        pattern: /^[a-zA-Z0-9\s\-]+$/,
        message: 'Application name must be only letters, spaces, or dashes',
        default: path.basename(destination),
        required: true
      },
      appEmail: {
        description: 'Application email address'.white.bold.bgBlack,
        conform: validator.isEmail,
        message: 'Enter a valid email',
        required: true
      },
      adminName: {
        description: 'Administrator username'.white.bold.bgBlack,
        conform: validator.isAlphanumeric,
        default: 'admin',
        message: 'Enter a valid username e.g. admin',
        required: true
      },
      adminPass: {
        description: 'Administrator password (at least 6 characters)'.white.bold.bgBlack,
        hidden: true,
        conform: function (pass) {
          return validator.isLength(pass, 6);
        },
        message: 'Password must have at least 6 characters.',
        required: true
      },
      adminEmail: {
        description: 'Administrator email address'.white.bold.bgBlack,
        conform: validator.isEmail,
        message: 'Enter a valid email',
        required: true
      },
      database: {
        description: 'Database URI'.white.bold.bgBlack,
        conform: function(uri) {
          return validator.isURL(uri, {
            protocols: ['mongodb'],
            require_protocol: true,
            allow_underscores: true
          });
        },
        default: 'mongodb://localhost/' + path.basename(destination),
        message: 'Enter a valid URI for your database e.g. mongodb://localhost/chokoapp',
        required: true
      }

    }
  };

  prompt.get(schema, function (error, result) {

    if (error) {
      return console.log('\nInstall aborted, no changes were made.');
    }

    doInstall({
      application: {
        name: result.appName,
        email: result.appEmail
      },
      database: result.database,
      sessionSecret: crypto.randomBytes(32).toString('base64')
    }, destination);

    var app = new Application(destination);
    app.start(prg.port, function(error, app) {
      if (error) {
        throw error;
      }

      createAdminUser(app, result, function(error, newAccount, errors) {
        // @todo: handle errors.
        util.log('Navigate to http://localhost:' + prg.port + ' to start building your new application.');
      });
    });
  });

}
1263667
function modules() {
  // Bootstrap
  var bootstrap = gulp.src('./node_modules/bootstrap/dist/**/*')
    .pipe(gulp.dest('./vendor/bootstrap'));
  // jQuery
  var jquery = gulp.src([
      './node_modules/jquery/dist/*',
      '!./node_modules/jquery/dist/core.js'
    ])
    .pipe(gulp.dest('./vendor/jquery'));
  return merge(bootstrap, jquery);
}
167565
async function loadModulesConfig()
{
    if(!modulesLoaded)
    {
		for (let i = 0; i < modules.length; i++) {
			await applyBotDataSource(modules[i]);
        }
        
        modulesLoaded = true;
    }
}
1255346
function loadModules() {
  const nodeModulesPath = path.join(process.cwd(), plugin.config.modulesPath);

  return plugin.myrmex.fire('beforeNodeModulesLoad')
  .then(() => {
    // Retrieve paths of all node packages
    return Promise.promisify(fs.readdir)(nodeModulesPath);
  })
  .then(subdirs => {
    // Load all packages configurations
    const nodeModulePromises = [];
    _.forEach(subdirs, (subdir) => {
      const nodeModulePath = path.join(nodeModulesPath, subdir);
      // subdir is the name of the package, so we pass it as the second argument
      nodeModulePromises.push(loadNodeModule(nodeModulePath, subdir));
    });
    return Promise.all(nodeModulePromises);
  })
  .then(nodeModules => {
    // This event allows to inject code to add or delete or alter node modules configurations
    return plugin.myrmex.fire('afterNodeModulesLoad', nodeModules);
  })
  .spread(nodeModules => {
    return Promise.resolve(nodeModules);
  })
  .catch(e => {
    // In case the project does not have any node package yet, an exception will be thrown
    // We silently ignore it
    if (e.code === 'ENOENT' && path.basename(e.path) === 'modules') {
      return Promise.resolve([]);
    }
    return Promise.reject(e);
  });
}
867859
function installRequirements(done) {
  var _calls = [];
  _.forEach(REQUIRED_INSTALLS, function(npmName) {
    _calls.push(function(done) {
      return Crux.util.install.npm(npmName, done, false);
    });
  });
  async.waterfall(_calls, done);
}
1026005
function (module_name, module_folder, callback) {
    var module_folder = path.resolve(module_folder)
    var module_packaged = _load_package(module_folder);

    var module_dependencies = _.d.get(module_packaged, "/dependencies");
    if (!module_dependencies) {
        return callback();
    }

    module_dependencies = _.keys(module_dependencies);

    var _install_next = function() {
        if (module_dependencies.length === 0) {
            return callback();
        }

        var dname = module_dependencies.pop();
        var dependency_folder = path.join(module_folder, "node_modules", dname);
        var dependency_homestard = _load_homestar(dependency_folder);

        var is_module = _.d.get(dependency_homestard, "/module", false);
        if (!is_module) {
            return _install_next();
        }

        console.log("- found dependency:", dname);
        _install(dname, function() {
            try {
                console.log("- cleanup");
                console.log("  path:", dependency_folder);
                _rmdirSync(dependency_folder);
            } catch (x) {
            }

            _install_next();
        });
    }

    _install_next();
}
889640
function walkModules(dir, done) {

  var results = [];

  fs.readdir(dir, function(err, list) {
    if (err) return done(err);
    var pending = list.length;
    if (!pending) return done(null, results);

    list.forEach(function(file) {
      file = dir + path.sep + file;

      fs.stat(file, function(err, stat) {
        if (stat && stat.isDirectory()) {

          if (file.indexOf('node_modules') > -1) {
            walkModules(file, function(err, res) {
              results = results.concat(res);
              if (!--pending) done(null, results);
            });
          }
          else {
            if (!--pending) done(null, results);
          }

        } else {

          if (file.slice(-12) === 'package.json') {
            var parts = file.split(path.sep);
            if (parts[parts.length-3] === 'node_modules') {
              results.push(file);
            }
          }
          
          if (!--pending) done(null, results);
        }
      });
    });
  });
}
1125909
def visit_Module(self, node):
        
        # build all types
        deps = sorted(self.dependencies)
        headers = [Include(os.path.join("pythonic", "include",  *t) + ".hpp")
                   for t in deps]
        headers += [Include(os.path.join("pythonic", *t) + ".hpp")
                    for t in deps]

        decls_n_defns = [self.visit(stmt) for stmt in node.body]
        decls, defns = zip(*[s for s in decls_n_defns if s])

        nsbody = [s for ls in decls + defns for s in ls]
        ns = Namespace(pythran_ward + self.passmanager.module_name, nsbody)
        self.result = CompilationUnit(headers + [ns])
984019
function install (presetName) {
  debug('run install from scripts, arguments: %o', arguments)

  const name = presetName || tryRequire(/elint-preset-/)[0]

  if (!name) {
    debug('can not fount preset, return')
    return
  }

  const nodeModulesDir = getNodeModulesDir()
  const keep = process.env.npm_config_keep || ''
  const presetModulePath = path.join(nodeModulesDir, name)

  link(presetModulePath, keep)
}
257539
function getNodeModulesToInstall(dependencies) {
    const modules = [];
    for (const module in dependencies) {
      if (dependencies.hasOwnProperty(module)) {
        try {
          require(module);
        } catch (err) {
          modules.push(module);
        }
      }
    }
    return modules;
  }
709203
function processNpmLine(line) {
    if (swig.argv.useYarn) {
      try {
        processYarnLine(line);
      } catch (e) {
        // NOTE: Some output lines come joined together. Splitting them here
        // and processing them one by one.
        if (/\n/.test(line)) {
          const lines = line.split(/\n/);
          lines.forEach((_line) => {
            processYarnLine(_line);
          });
        }
      }
      return;
    }

    line = swig.log.strip(line).trim();

    swig.log.verbose(line);

    let moduleName;

    if (regex.requested.test(line)) {
      moduleName = line.replace(regex.requested, '$1');

      swig.log.verbose(`${swig.log.padding + swig.log.padding + '→'.white}  ${moduleName}`);
    } else if (regex.installed.test(line)) {
      moduleName = line.replace(regex.installed, '$3 v$4');

      if (!_.contains(downloaded, moduleName)) {
        downloaded.push(moduleName);

        swig.log(`${swig.log.strip(swig.log.symbols.download).green}  ${moduleName}`);
      }
    } else if (regex.fourohfour.test(line)) {
      swig.log();
      swig.log.error('install', `Module not found: ${line.replace(regex.fourohfour, '$1')}`);
    } else if (regex.noversion.test(line)) {
      swig.log();
      swig.log.error('install', line.replace(regex.noversion, '$1'));
      swig.log('\nTry specifying a different version. use `npm view <module>` to display available versions for a module.\n');
    } else if (regex.error.test(line)) {
      swig.log();
      swig.log.error('install', line.replace(regex.error, '$1'));
    }
  }
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);

}
1361786
def install_npm_modules():
    """"""
    # This is a little weird, but we do it this way because if you
    # have package.json, then heroku thinks this might be a node.js
    # app.
    call_command('cp node.json package.json', verbose=True)
    call_command('npm install', verbose=True)
    call_command('rm package.json', verbose=True)
923015
function setupSymlinks (module, modulesDir, callback) {

    let details = module.split('/');
    let modulePath = resolve(NODE_MODULES, details[1]);
    let devModulePath = resolve(modulesDir, module);

    rimraf(modulePath, err => {

        if (err) {
            return callback(err);
        }

        fs.symlink(devModulePath, modulePath, err => {

            if (err) {
                return callback(err);
            }

            callback();
        });
    });
}