hdoc-tools 0.9.32 → 0.9.33
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/hdoc-build.js +16 -6
- package/package.json +1 -1
package/hdoc-build.js
CHANGED
@@ -725,18 +725,28 @@
|
|
725
725
|
for (let i = 0; i < md_files.length; i++) {
|
726
726
|
mdPromiseArray.push(md_files[i]);
|
727
727
|
}
|
728
|
-
|
729
|
-
|
730
|
-
|
728
|
+
const chunkSize = 10;
|
729
|
+
for (let i = 0; i < mdPromiseArray.length; i += chunkSize) {
|
730
|
+
const chunk = mdPromiseArray.slice(i, i + chunkSize);
|
731
|
+
// do whatever
|
732
|
+
await Promise.all(chunk.map(async (file) => {
|
733
|
+
await transform_markdown_and_save_html(file);
|
734
|
+
}));
|
735
|
+
}
|
736
|
+
|
737
|
+
|
731
738
|
|
732
739
|
// Work through Static HTML files and add Frontmatter tags
|
733
740
|
let htmlPromiseArray = [];
|
734
741
|
for (let i = 0; i < static_html_files.length; i++) {
|
735
742
|
htmlPromiseArray.push(static_html_files[i]);
|
736
743
|
}
|
737
|
-
|
738
|
-
|
739
|
-
|
744
|
+
for (let i = 0; i < mdPromiseArray.length; i += chunkSize) {
|
745
|
+
const chunk = htmlPromiseArray.slice(i, i + chunkSize);
|
746
|
+
await Promise.all(chunk.map(async (file) => {
|
747
|
+
await transform_static_html(file);
|
748
|
+
}));
|
749
|
+
}
|
740
750
|
|
741
751
|
|
742
752
|
if (pdf_enable) {
|