Select Git revision
AssignmentRunCommand.ts
Forked from
Dojo Project (HES-SO) / Projects / UI / DojoCLI
Source project has a limited visibility.
AssignmentRunCommand.ts 898 B
import CommanderCommand from '../../CommanderCommand';
import Config from '../../../config/Config';
import ExerciseRunHelper from '../../../helpers/Dojo/ExerciseRunHelper';
class AssignmentRunCommand extends CommanderCommand {
protected commandName: string = 'run';
protected defineCommand() {
// This command is synced with the "exercise run" command
this.command
.description('locally run the assignment as 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 AssignmentRunCommand();