docula 0.12.1 → 0.12.2
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/dist/docula.js +10 -14
- package/package.json +12 -11
package/dist/docula.js
CHANGED
|
@@ -606,9 +606,7 @@ var DoculaBuilder = class {
|
|
|
606
606
|
}
|
|
607
607
|
mergeSectionWithOptions(section, options) {
|
|
608
608
|
if (options.sections) {
|
|
609
|
-
const sectionOptions = options.sections.find(
|
|
610
|
-
(sectionOption) => sectionOption.path === section.path
|
|
611
|
-
);
|
|
609
|
+
const sectionOptions = options.sections.find((sectionOption) => sectionOption.path === section.path);
|
|
612
610
|
if (sectionOptions) {
|
|
613
611
|
section.name = sectionOptions.name;
|
|
614
612
|
section.order = sectionOptions.order;
|
|
@@ -637,15 +635,15 @@ var DoculaBuilder = class {
|
|
|
637
635
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
638
636
|
title: matterData.title,
|
|
639
637
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
640
|
-
navTitle: matterData.navTitle
|
|
638
|
+
navTitle: matterData.navTitle ?? matterData.title,
|
|
641
639
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
642
|
-
description: matterData.description
|
|
640
|
+
description: matterData.description ?? "",
|
|
643
641
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
644
|
-
order: matterData.order
|
|
642
|
+
order: matterData.order ?? void 0,
|
|
645
643
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
646
|
-
section: matterData.section
|
|
644
|
+
section: matterData.section ?? void 0,
|
|
647
645
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
648
|
-
keywords: matterData.keywords
|
|
646
|
+
keywords: matterData.keywords ?? [],
|
|
649
647
|
content: documentContent,
|
|
650
648
|
markdown: markdownContent,
|
|
651
649
|
generatedHtml: this._ecto.renderSync(markdownContent, void 0, "markdown"),
|
|
@@ -908,12 +906,10 @@ var Docula = class {
|
|
|
908
906
|
const config = {
|
|
909
907
|
public: outputPath
|
|
910
908
|
};
|
|
911
|
-
this._server = http.createServer(
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
)
|
|
916
|
-
);
|
|
909
|
+
this._server = http.createServer(async (request, response) => (
|
|
910
|
+
/* c8 ignore next */
|
|
911
|
+
handler(request, response, config)
|
|
912
|
+
));
|
|
917
913
|
this._server.listen(port, () => {
|
|
918
914
|
this._console.log(`Docula \u{1F987} at http://localhost:${port}`);
|
|
919
915
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docula",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "Beautiful Website for Your Projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/docula.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"generate-init-file": "tsx scripts/generate-init-file.ts",
|
|
42
42
|
"website:build": "rimraf ./site/README.md && node bin/docula.mjs build -s ./site -o ./site/dist",
|
|
43
43
|
"website:serve": "rimraf ./site/README.md && node bin/docula.mjs serve -s ./site -o ./site/dist",
|
|
44
|
-
"prepare": "
|
|
44
|
+
"prepare": "pnpm build"
|
|
45
45
|
},
|
|
46
46
|
"bin": {
|
|
47
47
|
"docula": "./bin/docula.mjs"
|
|
@@ -49,28 +49,28 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"axios": "^1.9.0",
|
|
51
51
|
"cheerio": "^1.0.0",
|
|
52
|
-
"ecto": "^4.2.
|
|
53
|
-
"feed": "^5.0
|
|
52
|
+
"ecto": "^4.2.4",
|
|
53
|
+
"feed": "^5.1.0",
|
|
54
54
|
"he": "^1.2.0",
|
|
55
55
|
"serve-handler": "^6.1.6",
|
|
56
56
|
"update-notifier": "^7.3.1",
|
|
57
|
-
"writr": "^4.4.
|
|
57
|
+
"writr": "^4.4.4"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/express": "^5.0.2",
|
|
61
61
|
"@types/he": "^1.2.3",
|
|
62
62
|
"@types/js-yaml": "^4.0.9",
|
|
63
|
-
"@types/node": "^22.15.
|
|
63
|
+
"@types/node": "^22.15.24",
|
|
64
64
|
"@types/serve-handler": "^6.1.4",
|
|
65
65
|
"@types/update-notifier": "^6.0.8",
|
|
66
|
-
"@vitest/coverage-v8": "^3.1.
|
|
66
|
+
"@vitest/coverage-v8": "^3.1.4",
|
|
67
67
|
"rimraf": "^6.0.1",
|
|
68
68
|
"tsup": "^8.5.0",
|
|
69
69
|
"tsx": "^4.19.4",
|
|
70
70
|
"typescript": "^5.8.3",
|
|
71
|
-
"vitest": "^3.1.
|
|
72
|
-
"webpack": "^5.99.
|
|
73
|
-
"xo": "^0.
|
|
71
|
+
"vitest": "^3.1.4",
|
|
72
|
+
"webpack": "^5.99.9",
|
|
73
|
+
"xo": "^1.0.0"
|
|
74
74
|
},
|
|
75
75
|
"xo": {
|
|
76
76
|
"ignores": [
|
|
@@ -87,7 +87,8 @@
|
|
|
87
87
|
],
|
|
88
88
|
"pnpm": {
|
|
89
89
|
"onlyBuiltDependencies": [
|
|
90
|
-
"esbuild"
|
|
90
|
+
"esbuild",
|
|
91
|
+
"unrs-resolver"
|
|
91
92
|
]
|
|
92
93
|
}
|
|
93
94
|
}
|