StarRailCopilot/webapp/packages/common/utils/checkIsFirst.ts

14 lines
431 B
TypeScript
Raw Normal View History

2023-09-09 16:22:01 +00:00
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}`,
),
);
}