mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-11 07:24:45 +00:00
15 lines
364 B
JavaScript
15 lines
364 B
JavaScript
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)
|
|
}
|