mv site | lib config

This commit is contained in:
babayaga 2025-12-27 16:02:50 +01:00
parent e4f2d4c51b
commit 94eddc3cf9
3 changed files with 4 additions and 7 deletions

View File

@ -8,7 +8,7 @@ import { substitute } from "@polymech/commons/variables";
import { appConfigSchema } from "./config.schema.js";
import type { AppConfig } from "./config.schema.js";
import { I18N_SOURCE_LANGUAGE } from "./constants.js"
const I18N_SOURCE_LANGUAGE = 'en';
const LIBRARY_CONFIG_PATH = path.resolve("./app-config.json");
const USER_CONFIG_DEFAULT_PATH = path.resolve("./app-config.local.json");
@ -51,8 +51,7 @@ export function loadConfig(
}
const variables = {
LANG: locale,
...process.env
LANG: locale
};
const substitutedLibraryContent = substitute(false, rawLibraryContent, variables);

View File

@ -4,10 +4,8 @@ import { resolve, template } from '@polymech/commons'
import { sync as read } from '@polymech/fs/read'
import { sanitizeUri } from 'micromark-util-sanitize-uri'
import { loadConfig } from './config-loader.js'
import { I18N_SOURCE_LANGUAGE } from "./constants.js"
export { I18N_SOURCE_LANGUAGE }
export const I18N_SOURCE_LANGUAGE = 'en'
// Load config
const config = loadConfig(I18N_SOURCE_LANGUAGE)

View File

@ -25,7 +25,7 @@ const imagesSchema = z.object({
type Images = z.infer<typeof imagesSchema>;
import { loadConfig } from './config-loader.js'
import { I18N_SOURCE_LANGUAGE } from "./constants.js"
import { I18N_SOURCE_LANGUAGE } from "./config.js"
// Load config
const config = loadConfig(I18N_SOURCE_LANGUAGE)