mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 08:53:51 +00:00
docs: add initial documentation to external assets
This commit is contained in:
committed by
Carlos Valente
parent
b577057768
commit
76e12af116
@@ -17,6 +17,7 @@ export const config = {
|
||||
directory: 'sheets',
|
||||
},
|
||||
restoreFile: 'ontime.restore',
|
||||
user: 'user',
|
||||
styles: {
|
||||
directory: 'styles',
|
||||
filename: 'override.css',
|
||||
|
||||
@@ -44,6 +44,15 @@ export function getAppDataPath(): string {
|
||||
/**
|
||||
* 1. Paths relative to the installation (or source in development)
|
||||
* ------------------------------------------------------------------
|
||||
* src/
|
||||
* ├─ projects/
|
||||
* ├─ external/
|
||||
* │ ├─ demo/
|
||||
* ├─ user/
|
||||
* │ ├─ styles/
|
||||
* │ │ ├─ override.css
|
||||
* │ ├─ logo/
|
||||
* │ │ ├─ logo.png
|
||||
*/
|
||||
|
||||
/** resolve file URL in both CJS and ESM (build and dev) */
|
||||
@@ -64,12 +73,12 @@ export const srcDir = {
|
||||
/** Path to the react app */
|
||||
clientDir: isProduction ? join(srcDirectory, 'client/') : join(srcDirectory, '../../client/build/'),
|
||||
/** Path to the demo app */
|
||||
demoDir: join(srcDirectory, '/external/demo/'),
|
||||
demoDir: join(srcDirectory, 'external', config.demo.directory),
|
||||
} as const;
|
||||
|
||||
export const srcFiles = {
|
||||
/** Path to bundled CSS */
|
||||
cssOverride: join(srcDir.root, '/external/styles/', config.styles.filename),
|
||||
cssOverride: join(srcDir.root, config.user, config.styles.directory, config.styles.filename),
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -91,8 +100,6 @@ const externalsStartDirectory = isProduction ? resolvePublicDirectory : join(src
|
||||
|
||||
export const publicDir = {
|
||||
root: resolvePublicDirectory,
|
||||
/** path to sheets folder */
|
||||
sheetsDir: join(resolvePublicDirectory, config.sheets.directory),
|
||||
/** path to crash reports folder */
|
||||
crashDir: join(resolvePublicDirectory, config.crash),
|
||||
/** path to projects folder */
|
||||
@@ -109,8 +116,10 @@ export const publicDir = {
|
||||
isProduction ? '/external/' : '', // move to external folder in production
|
||||
config.demo.directory,
|
||||
),
|
||||
/** path to user folder */
|
||||
userDir: join(resolvePublicDirectory, config.user),
|
||||
/** path to external styles override */
|
||||
stylesDir: join(externalsStartDirectory, config.styles.directory),
|
||||
stylesDir: join(resolvePublicDirectory, config.user, config.styles.directory),
|
||||
} as const;
|
||||
|
||||
/**
|
||||
@@ -123,4 +132,4 @@ export const publicFiles = {
|
||||
restoreFile: join(publicDir.root, config.restoreFile),
|
||||
/** path to CSS override file */
|
||||
cssOverride: join(publicDir.stylesDir, config.styles.filename),
|
||||
};
|
||||
} as const;
|
||||
|
||||
Reference in New Issue
Block a user