installer.js
Component install tool. This is the library that component(1)
uses to install components.Installation
$ npm install component-installer
Example
var Installer = require('component-installer');
var installer = new Installer(__dirname);
installer.on('package', function (pkg) {
console.log('installing', pkg.name, pkg.version);
});
installer.install(function (err) {
console.log('installed');
});
API
new Installer(dir)
Creates a newInstaller
for the given component dir
.Installer#install(callback)
Install the component's dependencies andcallback(err)
.Installer#installPackage(name, version)
Install a dependency byname
and version
.Installer#use(plugin)
Use the givenplugin
.Installer#development()
Install development dependencies.Installer#concurrency(number)
Set thenumber
of packages to install concurrently.Installer#force()
Force installation even if the component already exists.Installer#destination(dir)
Set the install destinationdir
.Installer#remote(url)
Add a remote to the installer byurl
.Installer#proxy(url)
Set the installer's proxyurl
.