mirror of
https://git.bits.team/Bits/mod-manager.git
synced 2025-06-30 09:09:42 -04:00
Initial Commit
This commit is contained in:
16
src/commands/init_command.ts
Normal file
16
src/commands/init_command.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { Command } from "commander";
|
||||
import Initialiser from "../util/initialiser.js";
|
||||
import Subcommand from "./subcommand.js";
|
||||
|
||||
export default class InitCommand extends Subcommand {
|
||||
registerCommand(program: Command) {
|
||||
program.command("init")
|
||||
.description("Initalises mod manager")
|
||||
.action(this.execute);
|
||||
}
|
||||
|
||||
execute() {
|
||||
Initialiser.initialise();
|
||||
}
|
||||
|
||||
}
|
6
src/commands/subcommand.ts
Normal file
6
src/commands/subcommand.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { Command } from "commander";
|
||||
|
||||
export default abstract class Subcommand {
|
||||
abstract registerCommand(program: Command): void;
|
||||
abstract execute(): void;
|
||||
}
|
Reference in New Issue
Block a user