@mono-labs/cli 0.0.212 → 0.0.214
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.
|
@@ -18,6 +18,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.generateDocsIndex = generateDocsIndex;
|
|
19
19
|
const node_fs_1 = require("node:fs");
|
|
20
20
|
const node_path_1 = __importDefault(require("node:path"));
|
|
21
|
+
function createSpacer() {
|
|
22
|
+
return '\n\n';
|
|
23
|
+
}
|
|
21
24
|
/**
|
|
22
25
|
* Generate a docs index from markdown files.
|
|
23
26
|
*
|
|
@@ -48,9 +51,6 @@ async function generateDocsIndex({ docsDir, excludeFile, }) {
|
|
|
48
51
|
continue;
|
|
49
52
|
const rawTitle = match[1].trim();
|
|
50
53
|
const relativeLink = `./${entry.name}`;
|
|
51
|
-
links.push('\n');
|
|
52
|
-
links.push('---');
|
|
53
|
-
links.push('\n');
|
|
54
54
|
/**
|
|
55
55
|
* Detect leading non-alphanumeric characters (emoji / symbols).
|
|
56
56
|
* This matches one or more Unicode characters that are NOT letters or numbers.
|
|
@@ -69,5 +69,5 @@ async function generateDocsIndex({ docsDir, excludeFile, }) {
|
|
|
69
69
|
// Append Back to Readme
|
|
70
70
|
links.push('');
|
|
71
71
|
links.push('🏠 ← [Back to README](../README.md)');
|
|
72
|
-
return links.join('\n');
|
|
72
|
+
return ['', '---', '', ...links].join('\n');
|
|
73
73
|
}
|
package/package.json
CHANGED
|
@@ -20,6 +20,9 @@ export interface GenerateDocsIndexOptions {
|
|
|
20
20
|
excludeFile?: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
function createSpacer() {
|
|
24
|
+
return '\n\n';
|
|
25
|
+
}
|
|
23
26
|
/**
|
|
24
27
|
* Generate a docs index from markdown files.
|
|
25
28
|
*
|
|
@@ -35,7 +38,6 @@ export async function generateDocsIndex({
|
|
|
35
38
|
const entries = await fs.readdir(dirPath, { withFileTypes: true });
|
|
36
39
|
|
|
37
40
|
const links: string[] = [];
|
|
38
|
-
|
|
39
41
|
for (const entry of entries) {
|
|
40
42
|
if (!entry.isFile()) continue;
|
|
41
43
|
if (!entry.name.endsWith('.md')) continue;
|
|
@@ -56,10 +58,6 @@ export async function generateDocsIndex({
|
|
|
56
58
|
const rawTitle = match[1].trim();
|
|
57
59
|
const relativeLink = `./${entry.name}`;
|
|
58
60
|
|
|
59
|
-
links.push('\n');
|
|
60
|
-
links.push('---');
|
|
61
|
-
links.push('\n');
|
|
62
|
-
|
|
63
61
|
/**
|
|
64
62
|
* Detect leading non-alphanumeric characters (emoji / symbols).
|
|
65
63
|
* This matches one or more Unicode characters that are NOT letters or numbers.
|
|
@@ -81,5 +79,5 @@ export async function generateDocsIndex({
|
|
|
81
79
|
links.push('');
|
|
82
80
|
links.push('🏠 ← [Back to README](../README.md)');
|
|
83
81
|
|
|
84
|
-
return links.join('\n');
|
|
82
|
+
return ['', '---', '', ...links].join('\n');
|
|
85
83
|
}
|