mirror of
https://github.com/syuilo/ai.git
synced 2024-11-12 17:08:00 +00:00
fsでconfigを読み込み
This commit is contained in:
parent
3f710c7c6b
commit
5b2bcdda3c
|
@ -18,9 +18,11 @@ type Config = {
|
|||
};
|
||||
|
||||
import chalk from 'chalk';
|
||||
import uncheckedConfig from '../config.json' assert { type: 'json' };
|
||||
import fs from "fs";
|
||||
import { warn } from '@/utils/log.js';
|
||||
|
||||
const uncheckedConfig = JSON.parse(fs.readFileSync('./config.json', 'utf8'));
|
||||
|
||||
function warnWithPrefix(msg: string): void {
|
||||
warn(`[Config]: ${chalk.red(msg)}`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue