nodejs/deps/npm/lib/lifecycle-cmd.js
npm CLI robot c923ce7414
deps: upgrade npm to 10.7.0
PR-URL: https://github.com/nodejs/node/pull/52767
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2024-05-01 06:53:22 +00:00

21 lines
551 B
JavaScript

const BaseCommand = require('./base-cmd.js')
// The implementation of commands that are just "run a script"
// restart, start, stop, test
class LifecycleCmd extends BaseCommand {
static usage = ['[-- <args>]']
static isShellout = true
static workspaces = true
static ignoreImplicitWorkspace = false
async exec (args) {
return this.npm.exec('run-script', [this.constructor.name, ...args])
}
async execWorkspaces (args) {
return this.npm.exec('run-script', [this.constructor.name, ...args])
}
}
module.exports = LifecycleCmd