
Security News
Socket Security Analysis Is Now One Click Away on npm
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.
Base plugin that adds methods for programmatically running npm commands.
You might also be interested in base-bower.
Install with npm:
$ npm install base-npm --save
var npm = require('base-npm');
var Base = require('base');
var app = new Base();
app.use(npm());
// install npm packages `micromatch` and `is-absolute`
app.npm.saveDev(['micromatch', 'is-absolute'], function(err) {
if (err) throw err;
});
Execute npm install with the given args, package names and callback.
Params
args {String|Array}names {String|Array}cb {Function}: CallbackExample
app.npm('--save', ['isobject'], function(err) {
if (err) throw err;
});
Install one or more packages. Does not save anything to package.json. Equivalent of npm install foo.
Params
names {String|Array}: package namescb {Function}: CallbackExample
app.npm.install('isobject', function(err) {
if (err) throw err;
});
(Re-)install and save the latest version of all dependencies and devDependencies currently listed in package.json.
Params
cb {Function}: CallbackExample
app.npm.latest(function(err) {
if (err) throw err;
});
Execute npm install --save with one or more package names. Updates dependencies in package.json.
Params
names {String|Array}cb {Function}: CallbackExample
app.npm.save('micromatch', function(err) {
if (err) throw err;
});
Execute npm install --save-dev with one or more package names. Updates devDependencies in package.json.
Params
names {String|Array}cb {Function}: CallbackExample
app.npm.saveDev('isobject', function(err) {
if (err) throw err;
});
Prompts the user to ask if they want to install the given package(s). Requires the base-questions plugin to be registered first.
Params
names {String|Array}: One or more package names.options {Object}callback {Function}Example
app.npm.askInstall('isobject', function(err) {
if (err) throw err;
});
You might also be interested in these projects:
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Generate readme and API documentation with verb:
$ npm install verb && npm run docs
Or, if verb is installed globally:
$ verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on April 13, 2016.
FAQs
Base plugin that adds methods for programmatically running npm commands.
The npm package base-npm receives a total of 3,819 weekly downloads. As such, base-npm popularity was classified as popular.
We found that base-npm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.