tra-analysis/website/node_modules/npm/lib/utils/lifecycle.js

15 lines
364 B
JavaScript
Raw Normal View History

2019-01-06 19:14:45 +00:00
exports = module.exports = runLifecycle
const lifecycleOpts = require('../config/lifecycle')
const lifecycle = require('npm-lifecycle')
function runLifecycle (pkg, stage, wd, moreOpts, cb) {
if (typeof moreOpts === 'function') {
cb = moreOpts
moreOpts = null
}
const opts = lifecycleOpts(moreOpts)
lifecycle(pkg, stage, wd, opts).then(cb, cb)
}