@alauda/doom 0.23.4 → 0.23.5
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.
|
@@ -74,7 +74,7 @@ export async function generatePdf({ pages, tempDir, port, host, outFile, outDir,
|
|
|
74
74
|
singleBar.stop();
|
|
75
75
|
await printer.closeBrowser();
|
|
76
76
|
const exportedPath = await mergePDF(normalizePages, outFile, outDir, allOutlines);
|
|
77
|
-
const message =
|
|
77
|
+
const message = `Exported to ${yellow(exportedPath)}\n`;
|
|
78
78
|
process.stdout.write(message);
|
|
79
79
|
await fs.rm(tempDir, { force: true, recursive: true });
|
|
80
80
|
return exportedPath;
|
|
@@ -112,7 +112,7 @@ export async function mergePDF(pages, outFile, outDir, pdfOutlines) {
|
|
|
112
112
|
}
|
|
113
113
|
const saveFilePath = join(saveDirPath, outFile);
|
|
114
114
|
if (pages.length === 0) {
|
|
115
|
-
process.
|
|
115
|
+
process.stderr.write(red('The website has no pages, please check whether the export path is set correctly'));
|
|
116
116
|
process.exit(1);
|
|
117
117
|
}
|
|
118
118
|
else if (pages.length === 1) {
|
package/lib/cli/export.js
CHANGED
|
@@ -85,9 +85,10 @@ export const exportCommand = new Command('export')
|
|
|
85
85
|
},
|
|
86
86
|
};
|
|
87
87
|
const exportPdf = async (sidebarItems, lang = config.lang) => {
|
|
88
|
-
|
|
88
|
+
const pages = collectPages(sidebarItems);
|
|
89
|
+
logger.start(`Exporting ${lang} language documents with ${pages.length} pages...`);
|
|
89
90
|
await generatePdf({
|
|
90
|
-
pages
|
|
91
|
+
pages,
|
|
91
92
|
outFile: getPdfName(lang, config.userBase, config.title),
|
|
92
93
|
...commonOptions,
|
|
93
94
|
});
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alauda/doom",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Doctor Doom making docs.",
|
|
6
6
|
"repository": "git+https://github.com/alauda/doom.git",
|
|
7
7
|
"homepage": "https://github.com/alauda/doom#readme",
|
|
8
|
-
"funding": "https://opencollective.com/alauda",
|
|
9
8
|
"license": "MIT",
|
|
10
9
|
"engines": {
|
|
11
10
|
"node": ">=18.17.0 <20 || >=20.1.0"
|