mirror of
https://github.com/nodejs/node.git
synced 2025-05-22 04:28:50 +00:00

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>
11 lines
349 B
JavaScript
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 })
|
|
}
|