@alauda/doom 0.0.0-alpha.6 → 0.0.0-alpha.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/lib/cli/index.js +0 -0
- package/lib/cli/load-config.js +0 -3
- package/lib/plugins/auto-sidebar/walk.js +3 -3
- package/lib/plugins/global/index.js +3 -2
- package/lib/runtime/index.d.ts +1 -0
- package/lib/runtime/index.js +1 -1
- package/lib/utils/constants.d.ts +2 -0
- package/lib/utils/constants.js +4 -0
- package/lib/utils/helpers.d.ts +2 -0
- package/lib/utils/helpers.js +4 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +2 -0
- package/package.json +3 -3
package/lib/cli/index.js
CHANGED
|
File without changes
|
package/lib/cli/load-config.js
CHANGED
|
@@ -100,7 +100,7 @@ export async function scanSideMeta(workDir, rootDir, docsDir, routePrefix, exten
|
|
|
100
100
|
_fileKey: path.relative(docsDir, path.join(workDir, metaItem)),
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
const { type = 'file', name, label = '', collapsible, collapsed, link, tag, dashed, overviewHeaders, context, } = metaItem;
|
|
103
|
+
const { type = 'file', name, label = '', collapsible, collapsed = true, link, tag, dashed, overviewHeaders, context, } = metaItem;
|
|
104
104
|
// when type is divider, name maybe undefined, and link is not used
|
|
105
105
|
const pureLink = `${relativePath}/${name.replace(/\.mdx?$/, '')}`;
|
|
106
106
|
if (type === 'file') {
|
|
@@ -190,8 +190,8 @@ export async function walk(workDir, routePrefix = '/', docsDir, extensions) {
|
|
|
190
190
|
for (const subDir of subDirs) {
|
|
191
191
|
const { index, others } = await scanSideMeta(path.join(workDir, subDir), workDir, docsDir, routePrefix, extensions);
|
|
192
192
|
const sidebar = index
|
|
193
|
-
? { ...index,
|
|
194
|
-
: { text: subDir,
|
|
193
|
+
? { ...index, items: others }
|
|
194
|
+
: { text: subDir, items: others };
|
|
195
195
|
if (!sidebar.items.length) {
|
|
196
196
|
// @ts-expect-error -- FIXME: rspress should handle `undefined` items
|
|
197
197
|
delete sidebar.items;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
|
|
3
|
+
import { baseResolve, pkgResolve } from '../../utils/index.js';
|
|
4
|
+
const componentsDir = baseResolve('runtime/components');
|
|
4
5
|
export const globalPlugin = () => {
|
|
5
6
|
return {
|
|
6
7
|
name: 'doom-global',
|
|
7
|
-
globalStyles:
|
|
8
|
+
globalStyles: pkgResolve('styles/global.scss'),
|
|
8
9
|
markdown: {
|
|
9
10
|
globalComponents: fs
|
|
10
11
|
.readdirSync(componentsDir)
|
package/lib/runtime/index.d.ts
CHANGED
package/lib/runtime/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alauda/doom",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Doctor Doom making docs.",
|
|
6
6
|
"repository": "https://gitlab-ce.alauda.cn/idp/Doom",
|
|
7
7
|
"packageManager": "yarn@4.5.0",
|
|
8
8
|
"engines": {
|
|
9
|
-
"node": ">=
|
|
9
|
+
"node": ">=18.12.0"
|
|
10
10
|
},
|
|
11
11
|
"bin": "./lib/cli/index.js",
|
|
12
12
|
"exports": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@swc/core": "1.7.40",
|
|
46
46
|
"@types/eslint__js": "^8.42.3",
|
|
47
47
|
"@types/fs-extra": "^11.0.4",
|
|
48
|
-
"@types/node": "
|
|
48
|
+
"@types/node": "~18.13.0",
|
|
49
49
|
"eslint": "^9.13.0",
|
|
50
50
|
"lint-staged": "^15.2.10",
|
|
51
51
|
"npm-run-all2": "^7.0.1",
|