@glossarist/concept-browser 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/load-site-config.mjs +1 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glossarist/concept-browser",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Vue SPA for browsing Glossarist terminology datasets with cross-reference resolution, graph visualization, and multi-language support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -23,26 +23,13 @@ function findConfigFile(args = []) {
|
|
|
23
23
|
return resolve(process.env.SITE_CONFIG);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const siteId = process.env.SITE_ID || args.find(a => !a.startsWith('-')) || null;
|
|
27
|
-
if (siteId) {
|
|
28
|
-
// Check project configs/ dir first
|
|
29
|
-
const p = resolve(projectRoot, 'configs', `${siteId}.yml`);
|
|
30
|
-
if (existsSync(p)) return p;
|
|
31
|
-
// Check CWD (deployment repo may have configs locally)
|
|
32
|
-
for (const name of [`${siteId}.yml`, 'site-config.yml']) {
|
|
33
|
-
const cwdP = resolve(process.cwd(), name);
|
|
34
|
-
if (existsSync(cwdP)) return cwdP;
|
|
35
|
-
}
|
|
36
|
-
throw new Error(`Site config not found for '${siteId}'. Checked configs/${siteId}.yml, ${siteId}.yml, site-config.yml in CWD`);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
26
|
// Check CWD first (deployment repos), then project root
|
|
40
27
|
for (const dir of [process.cwd(), projectRoot]) {
|
|
41
28
|
const p = resolve(dir, 'site-config.yml');
|
|
42
29
|
if (existsSync(p)) return p;
|
|
43
30
|
}
|
|
44
31
|
|
|
45
|
-
throw new Error('No site config found. Set SITE_CONFIG
|
|
32
|
+
throw new Error('No site config found. Set SITE_CONFIG or create site-config.yml');
|
|
46
33
|
}
|
|
47
34
|
|
|
48
35
|
export function loadSiteConfig(args = []) {
|