checkout
Simple unpacking of repositories to local directories.
Git Repositories
checkout({
type: 'git',
url: 'git@github.com:bmeck/ruffian',
destination: 'my-apps/ruffian'
}, function (err) {
console.error(err)
});
Streams from .tar files
checkout({
type: 'tar-stream',
stream: req,
destination: 'my-apps/ruffian'
}, function (err) {
console.error(err)
});
Local directories
checkout({
type: 'directory',
directory: 'my-repos/ruffian',
destination: 'my-apps/ruffian'
}, function (err) {
console.error(err)
});
npm packages
checkout({
type: 'npm',
package: 'ruffian',
version: '0.0.0',
destination: 'my-apps/ruffian',
protocol: 'https',
proxy: 'http://outbound-proxy.com',
registry: 'registry.npmjs.org',
'strict-ssl': false,
headers: {
'user-agent': 'node-checkout'
}
}, function (err) {
console.error(err)
})
Custom Handler
checkout({
type: function (description, callback) {
},
}, function (err) {
console.error(err)
})
Registering a generic handler
checkout.handlers.myHandler = function (description, callback) {
}