Global

Methods

deployPackage(url, dist) → {promise}

Download and extract the package tarball
Parameters:
Name Type Description
url string from download tarball url
dist string to extract directory
Source:
Returns:
task - fulfill is deployment the complete
Type
promise

expressNpmcdn(cwd, optionsopt) → {Router}

create npmcdn middleware
Parameters:
Name Type Attributes Description
cwd string a package extract base path
options object <optional>
Properties
Name Type Attributes Description
api object <optional>
tarball source
extensions object <optional>
see resolveFileName
maxAge object <optional>
send max age header
Source:
Returns:
npmcdn - see http://expressjs.com/ja/api.html#router
Type
Router

resolveFileName(file, optionsopt) → {promise}

lookup file with extensions in dist eg: resolveFileName('foo') -> 'foo.js' or 'foo.json'
Parameters:
Name Type Attributes Description
file string lookup filename
options object <optional>
Properties
Name Type Attributes Description
dist object <optional>
a base path
extensions object <optional>
lookup file extensions
Source:
Returns:
fileName - fulfill is lookedup file
Type
promise