-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
per duojs/duo#116.
this will allow us to abstract all of the api stuff (arguably the most complex part of the codebase), letting this module just handle the important stuff like untarring, caching, installing, etc. it'll also allow us to easily add support for other providers (bitbucket, gitorious, etc.).
public api needs to be decided, but something based on duojs/duo#116 (comment) has my vote:
var pkg = new Package('somebody/something', '0.13.x')
pkg.provider(require('duo-github'))
pkg.token('abcdefg')
pkg.directory('components')
pkg.fetch(function(err){ ... })
var pkg = new Package('someone-else/somerepo', '~0.1')
pkg.provider(require('duo-bitbucket'))
...
var pkg = new Package('someguy/somepackage', '~0.1')
pkg.provider(require('duo-gitorious'))
...
in order to not break back-compat, we could simply add something like:
if (!this.provider()) this.provider(require('duo-github'));
to Package#fetch
.
Metadata
Metadata
Assignees
Labels
No labels