mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 06:29:07 +00:00
remove redundant path evaluation
This commit is contained in:
@@ -59,17 +59,13 @@ const currentDir = dirname(__dirname);
|
|||||||
export const srcDirectory = isProduction ? currentDir : path.join(currentDir, '../');
|
export const srcDirectory = isProduction ? currentDir : path.join(currentDir, '../');
|
||||||
|
|
||||||
// resolve path to external
|
// resolve path to external
|
||||||
const productionPath = path.join(srcDirectory, '../../resources/extraResources/client');
|
const productionPath = path.join(srcDirectory, 'client/');
|
||||||
const devPath = path.join(srcDirectory, '../../client/build/');
|
const devPath = path.join(srcDirectory, '../../client/build/');
|
||||||
const dockerPath = path.join(srcDirectory, 'client/');
|
|
||||||
|
|
||||||
export const resolvedPath = (): string => {
|
export const resolvedPath = (): string => {
|
||||||
if (isTest) {
|
if (isTest) {
|
||||||
return devPath;
|
return devPath;
|
||||||
}
|
}
|
||||||
if (isDocker) {
|
|
||||||
return dockerPath;
|
|
||||||
}
|
|
||||||
if (isProduction) {
|
if (isProduction) {
|
||||||
return productionPath;
|
return productionPath;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user