mirror of
https://github.com/nodejs/node.git
synced 2025-05-22 05:46:19 +00:00

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>
12 lines
412 B
JavaScript
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 })
|
|
}
|