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