mirror of
https://git.bits.team/Bits/mod-manager.git
synced 2024-11-22 05:58:21 -05:00
Ran a reformat
This commit is contained in:
parent
4a16f8c69d
commit
6b700d465b
@ -1,4 +1,4 @@
|
|||||||
import { Command } from "commander";
|
import {Command} from "commander";
|
||||||
import Initialiser from "../util/initialiser.js";
|
import Initialiser from "../util/initialiser.js";
|
||||||
import Subcommand from "./subcommand.js";
|
import Subcommand from "./subcommand.js";
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Command } from "commander";
|
import {Command} from "commander";
|
||||||
import Subcommand from "./subcommand.js"
|
import Subcommand from "./subcommand.js"
|
||||||
import ModManager from "../mod-manager.js";
|
import ModManager from "../mod-manager.js";
|
||||||
import Mods from "../mods/mods.js";
|
import Mods from "../mods/mods.js";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Command } from "commander";
|
import {Command} from "commander";
|
||||||
|
|
||||||
export default interface Subcommand {
|
export default interface Subcommand {
|
||||||
registerCommand(program: Command): void;
|
registerCommand(program: Command): void;
|
||||||
|
@ -25,7 +25,6 @@ export default class ModManager {
|
|||||||
this.logger = ModManager.createLogger();
|
this.logger = ModManager.createLogger();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.program
|
this.program
|
||||||
.name('mod-manager')
|
.name('mod-manager')
|
||||||
.description('A package (mod) manager for Fabric Minecraft Servers');
|
.description('A package (mod) manager for Fabric Minecraft Servers');
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import Initialiser from "../util/initialiser.js";
|
import Initialiser from "../util/initialiser.js";
|
||||||
import PrintUtils from "../util/print_utils.js";
|
import PrintUtils from "../util/print_utils.js";
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
export default interface ModSource {
|
export default interface ModSource {
|
||||||
search(query: string): Promise<string>;
|
search(query: string): Promise<string>;
|
||||||
|
|
||||||
install(id: string): Promise<void>;
|
install(id: string): Promise<void>;
|
||||||
|
|
||||||
getName(): string;
|
getName(): string;
|
||||||
}
|
}
|
@ -35,6 +35,10 @@ export default class Initialiser {
|
|||||||
return existsSync(this.getModManagerFolderPath());
|
return existsSync(this.getModManagerFolderPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static getModManagerFolderPath(): string {
|
||||||
|
return path.join(this.MOD_MANAGER_FOLDER);
|
||||||
|
}
|
||||||
|
|
||||||
private static isDirFabricServer(): boolean {
|
private static isDirFabricServer(): boolean {
|
||||||
const serverProperties = path.join("server.properties");
|
const serverProperties = path.join("server.properties");
|
||||||
const fabric = path.join(".fabric");
|
const fabric = path.join(".fabric");
|
||||||
@ -53,8 +57,4 @@ export default class Initialiser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getModManagerFolderPath(): string {
|
|
||||||
return path.join(this.MOD_MANAGER_FOLDER);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,24 +1,8 @@
|
|||||||
import chalk from "chalk";
|
import chalk from "chalk";
|
||||||
import ora, { Ora } from "ora";
|
import ora, {Ora} from "ora";
|
||||||
|
|
||||||
export default class PrintUtils {
|
export default class PrintUtils {
|
||||||
|
|
||||||
static info(print: string) {
|
|
||||||
console.log(chalk.white(print));
|
|
||||||
}
|
|
||||||
|
|
||||||
static warn(print: string) {
|
|
||||||
console.log(chalk.yellowBright(print));
|
|
||||||
}
|
|
||||||
|
|
||||||
static success(print: string) {
|
|
||||||
console.log(chalk.greenBright(print));
|
|
||||||
}
|
|
||||||
|
|
||||||
static error(print: string) {
|
|
||||||
console.log(chalk.redBright(print));
|
|
||||||
}
|
|
||||||
|
|
||||||
static Spinner = class {
|
static Spinner = class {
|
||||||
private spinner: Ora;
|
private spinner: Ora;
|
||||||
|
|
||||||
@ -54,4 +38,20 @@ export default class PrintUtils {
|
|||||||
this.spinner.clear();
|
this.spinner.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static info(print: string) {
|
||||||
|
console.log(chalk.white(print));
|
||||||
|
}
|
||||||
|
|
||||||
|
static warn(print: string) {
|
||||||
|
console.log(chalk.yellowBright(print));
|
||||||
|
}
|
||||||
|
|
||||||
|
static success(print: string) {
|
||||||
|
console.log(chalk.greenBright(print));
|
||||||
|
}
|
||||||
|
|
||||||
|
static error(print: string) {
|
||||||
|
console.log(chalk.redBright(print));
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user