lifecycle-cmd.js 542 B

1234567891011121314151617181920
  1. const BaseCommand = require('./base-cmd.js')
  2. // The implementation of commands that are just "run a script"
  3. // e.g. restart, start, stop, test
  4. class LifecycleCmd extends BaseCommand {
  5. static usage = ['[-- <args>]']
  6. static isShellout = true
  7. static workspaces = true
  8. static ignoreImplicitWorkspace = false
  9. async exec (args) {
  10. return this.npm.exec('run', [this.constructor.name, ...args])
  11. }
  12. async execWorkspaces (args) {
  13. return this.npm.exec('run', [this.constructor.name, ...args])
  14. }
  15. }
  16. module.exports = LifecycleCmd