mihomo-party/src/main/factory.ts
2024-08-07 09:50:07 +08:00

10 lines
339 B
TypeScript

import { controledMihomoConfig, currentProfile } from './config'
import { mihomoWorkConfigPath } from './dirs'
import yaml from 'yaml'
import fs from 'fs'
export function generateProfile(): void {
const profile = Object.assign(currentProfile, controledMihomoConfig)
fs.writeFileSync(mihomoWorkConfigPath(), yaml.stringify(profile))
}