mizflow
Version:
DCS mission dynamic script injection and distribution tool
37 lines (29 loc) • 1.16 kB
JavaScript
import { Command } from 'commander';
import { CreateCommand, InitCommand, DistCommand } from '../dist/index.js';
const program = new Command();
program
.name('mizflow')
.description('DCS mission dynamic script injection and distribution tool')
.version('0.1.0');
program.command('create')
.argument('<directory>', 'Mizflow project name. A new directory with this name will be created')
.description('Create a MizFlow project. Scaffolds all necessary files and initializes an empty mission')
.action(async(options) => {
const command = new CreateCommand()
await command.handle(options)
});
program.command('init')
.description('Initialize mission. Add this working directory to the mission internal configuration')
.option('--reset', 'Overwrite mission internal configuration')
.action(async(options) => {
const command = new InitCommand()
await command.handle(options)
});
program.command('dist')
.description('Package mission for distribution')
.action(async() => {
const command = new DistCommand()
await command.handle()
});
program.parse();