Select Git revision
ExerciseRunCommand.ts
Forked from
Dojo Project (HES-SO) / Projects / UI / DojoCLI
206 commits behind the upstream repository.

michael.minelli authored
ExerciseRunCommand.ts 878 B
import CommanderCommand from '../../CommanderCommand';
import Config from '../../../config/Config';
import ExerciseRunHelper from '../../../helpers/Dojo/ExerciseRunHelper';
class ExerciseRunCommand extends CommanderCommand {
protected commandName: string = 'run';
protected defineCommand() {
// This command is synced with the "assignment run" command
this.command
.description('locally run an exercise')
.option('-p, --path <value>', 'exercise path', Config.folders.defaultLocalExercise)
.option('-v, --verbose', 'verbose mode (display docker compose logs in live)')
.action(this.commandAction.bind(this));
}
protected async commandAction(options: { path: string, verbose: boolean }): Promise<void> {
await ExerciseRunHelper.run(options);
}
}
export default new ExerciseRunCommand();