mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 22:49:18 +00:00
refactor: simplify setup of asset paths
This commit is contained in:
committed by
Carlos Valente
parent
e46948772e
commit
5950551da2
@@ -1,7 +1,8 @@
|
||||
import { Low } from 'lowdb';
|
||||
import { JSONFile } from 'lowdb/node';
|
||||
|
||||
import { appStatePath, isTest } from '../../setup/index.js';
|
||||
import { publicFiles } from '../../setup/index.js';
|
||||
import { isTest } from '../../externals.js';
|
||||
import { isPath } from '../../utils/fileManagement.js';
|
||||
import { shouldCrashDev } from '../../utils/development.js';
|
||||
|
||||
@@ -9,7 +10,7 @@ interface AppState {
|
||||
lastLoadedProject?: string;
|
||||
}
|
||||
|
||||
const adapter = new JSONFile<AppState>(appStatePath);
|
||||
const adapter = new JSONFile<AppState>(publicFiles.appState);
|
||||
const config = new Low<AppState>(adapter, {});
|
||||
|
||||
export async function isLastLoadedProject(projectName: string): Promise<boolean> {
|
||||
|
||||
Reference in New Issue
Block a user