node/deps/npm/lib/utils/lifecycle-cmd.js
Ruy Adorno 43e29418c4
deps: upgrade npm to 7.5.6
PR-URL: https://github.com/nodejs/node/pull/37496
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-02-25 09:52:12 -05:00

12 lines
412 B
JavaScript

// The implementation of commands that are just "run a script"
// test, start, stop, restart
const usageUtil = require('./usage.js')
const completion = require('./completion/none.js')
module.exports = (npm, stage) => {
const cmd = (args, cb) => npm.commands['run-script']([stage, ...args], cb)
const usage = usageUtil(stage, `npm ${stage} [-- <args>]`)
return Object.assign(cmd, { usage, completion })
}