node/deps/npm/lib/utils/lifecycle-cmd.js
Ruy Adorno 993963e2ee
deps: upgrade npm to 7.6.0
PR-URL: https://github.com/nodejs/node/pull/37559
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-03-02 09:31:29 +01:00

11 lines
349 B
JavaScript

// The implementation of commands that are just "run a script"
// test, start, stop, restart
const usageUtil = require('./usage.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 })
}