nitro-converter/src/Main.ts

34 lines
1.1 KiB
TypeScript
Raw Normal View History

import "reflect-metadata";
2021-01-28 09:12:04 +01:00
import Configuration from "./config/Configuration";
import {container} from "tsyringe";
import FigureConverter from "./figure/FigureConverter";
import FurnitureConverter from "./furniture/FurnitureConverter";
import PetConverter from "./pet/PetConverter";
import EffectConverter from "./effect/EffectConverter";
2021-01-28 09:12:04 +01:00
(async () => {
const config = container.resolve(Configuration);
2021-01-28 09:12:04 +01:00
await config.init();
if (config.getBoolean("convert.figure")) {
const figureConverter = container.resolve(FigureConverter);
await figureConverter.convertAsync();
2021-01-28 09:12:04 +01:00
}
if (config.getBoolean("convert.furniture")) {
const furnitureConverter = container.resolve(FurnitureConverter);
await furnitureConverter.convertAsync();
2021-02-02 04:43:38 +01:00
}
if (config.getBoolean("convert.pet")) {
const petConverter = container.resolve(PetConverter);
await petConverter.convertAsync();
}
2021-02-02 04:43:38 +01:00
if (config.getBoolean("convert.effect")) {
const effectConverter = container.resolve(EffectConverter);
await effectConverter.convertAsync();
2021-02-02 02:13:17 +01:00
}
2021-01-28 09:12:04 +01:00
console.log('finished!');
})()