Skip to content
Snippets Groups Projects
Select Git revision
  • e7dc5bba05810629e48c418161f6470caf188a04
  • main default protected
  • v3.3.0
  • add_link_in_readme
  • v3.2.1
  • v3.2.0
  • v3.1.2
  • 3.3.0-dev
  • 3.2.0
  • 3.1.2
  • 3.1.1
  • 3.1.0
  • 3.0.1
  • 3.0.0
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • v1.0.1
18 results

ExerciseRunCommand.ts

Blame
  • 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();