1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2025-12-18 17:25:22 +00:00
ArisuAutoSweeper/webapp/packages/common/utils/checkIsFirst.ts
2023-11-01 15:33:35 +08:00

14 lines
431 B
TypeScript

import getAlasABSPath from './getAlasABSPath';
import fs from 'fs';
import {join} from 'path';
import {ALAS_CONFIG_TEMPLATE_YAML, ALAS_CONFIG_TEST_TEMPLATE_YAML} from '../constant/config';
export function checkIsFirst(): boolean {
const absPath = getAlasABSPath();
return fs.existsSync(
join(
absPath,
`/config/${import.meta.env.DEV ? ALAS_CONFIG_TEST_TEMPLATE_YAML : ALAS_CONFIG_TEMPLATE_YAML}`,
),
);
}