mirror of
https://github.com/nodejs/node.git
synced 2025-05-15 16:01:52 +00:00

PR-URL: https://github.com/nodejs/node/pull/42550 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
18 lines
503 B
JavaScript
18 lines
503 B
JavaScript
// The implementation of commands that are just "run a script"
|
|
// restart, start, stop, test
|
|
|
|
const BaseCommand = require('./base-command.js')
|
|
class LifecycleCmd extends BaseCommand {
|
|
static usage = ['[-- <args>]']
|
|
static isShellout = true
|
|
|
|
async exec (args, cb) {
|
|
return this.npm.exec('run-script', [this.constructor.name, ...args])
|
|
}
|
|
|
|
async execWorkspaces (args, filters, cb) {
|
|
return this.npm.exec('run-script', [this.constructor.name, ...args])
|
|
}
|
|
}
|
|
module.exports = LifecycleCmd
|