Software: Apache. PHP/5.3.29 uname -a: Linux tardis23.nocplanet.net 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024
Safe-mode: OFF (not secure) /lib/node_modules/npm/lib/ drwxr-xr-x | |
| Viewing file: Select action/file-type: module.exports = docs
var openUrl = require('./utils/open-url')
var log = require('npmlog')
var fetchPackageMetadata = require('./fetch-package-metadata.js')
var usage = require('./utils/usage')
docs.usage = usage(
'docs',
'npm docs <pkgname>' +
'\nnpm docs .'
)
docs.completion = function (opts, cb) {
// FIXME: there used to be registry completion here, but it stopped making
// sense somewhere around 50,000 packages on the registry
cb()
}
function docs (args, cb) {
if (!args || !args.length) args = ['.']
var pending = args.length
log.silly('docs', args)
args.forEach(function (proj) {
getDoc(proj, function (err) {
if (err) {
return cb(err)
}
--pending || cb()
})
})
}
function getDoc (project, cb) {
log.silly('getDoc', project)
fetchPackageMetadata(project, '.', {fullMetadata: true}, function (er, d) {
if (er) return cb(er)
var url = d.homepage
if (!url) url = 'https://www.npmjs.org/package/' + d.name
return openUrl(url, 'docs available at the following URL', cb)
})
}
|
:: Command execute :: | |
--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0006 ]-- |