Updates
This commit is contained in:
parent
f61438bb1d
commit
8c7913f896
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "EditDatabase",
|
||||
"name": "UseACustomConfigFile",
|
||||
"version": "1.0.0",
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
|
@ -2,21 +2,22 @@ import type { DependencyContainer } from "tsyringe";
|
||||
|
||||
import { IMod } from "../types/@types/external/mod";
|
||||
import type { ILogger } from "../types/@types/spt/utils/ILogger";
|
||||
import * as modConfig from "../config/config.json";
|
||||
|
||||
class Mod implements IMod
|
||||
{
|
||||
private modConfig = require("../config/config.json");
|
||||
|
||||
// not used for this example
|
||||
public load(container: DependencyContainer): void
|
||||
{ return }
|
||||
|
||||
public delayedLoad(container: DependencyContainer): void
|
||||
{
|
||||
{
|
||||
// get logger
|
||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||
|
||||
// log the 'myProperty' value to the console
|
||||
logger.info(`here is the value from my config: ${modConfig.myProperty}`);
|
||||
logger.info(`here is the value from my config: ${this.modConfig.myProperty}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user