Welcome to mirror list, hosted at ThFree Co, Russian Federation.

lifecycle-cmd.js « lib - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 41633a4ba389c904d36591608073523bfd542504 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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