@xylabs/readme-gen 5.0.90 → 5.0.91
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/node/index.d.ts +1 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.mjs +0 -184
- package/dist/node/index.mjs.map +1 -1
- package/package.json +11 -8
- package/dist/node/generateReadmeFiles.d.ts +0 -7
- package/dist/node/generateReadmeFiles.d.ts.map +0 -1
- package/dist/node/generateTypeDoc.d.ts +0 -8
- package/dist/node/generateTypeDoc.d.ts.map +0 -1
package/dist/node/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAA"}
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,185 +1 @@
|
|
|
1
|
-
// src/generateReadmeFiles.ts
|
|
2
|
-
import { readFile, writeFile as writeFile2 } from "fs/promises";
|
|
3
|
-
import path2 from "path";
|
|
4
|
-
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
5
|
-
import { yarnWorkspaces } from "@xylabs/ts-scripts-yarn3";
|
|
6
|
-
|
|
7
|
-
// src/generateTypeDoc.ts
|
|
8
|
-
import { execSync } from "child_process";
|
|
9
|
-
import {
|
|
10
|
-
existsSync,
|
|
11
|
-
mkdirSync,
|
|
12
|
-
readdirSync,
|
|
13
|
-
readFileSync
|
|
14
|
-
} from "fs";
|
|
15
|
-
import { rm, writeFile } from "fs/promises";
|
|
16
|
-
import path from "path";
|
|
17
|
-
import { fileURLToPath } from "url";
|
|
18
|
-
async function generateTypeDoc(packageLocation, entryPoints) {
|
|
19
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
20
|
-
const tempDir = path.join(__dirname, ".temp-typedoc");
|
|
21
|
-
console.log(`Generating TypeDoc for package at: ${packageLocation}`);
|
|
22
|
-
for (const ep of entryPoints) {
|
|
23
|
-
console.log(` - Entry point: ${path.resolve(packageLocation, ep)}`);
|
|
24
|
-
}
|
|
25
|
-
try {
|
|
26
|
-
if (!existsSync(tempDir)) {
|
|
27
|
-
mkdirSync(tempDir, { recursive: true });
|
|
28
|
-
}
|
|
29
|
-
const typedocConfig = {
|
|
30
|
-
entryPoints: entryPoints.map((ep) => path.resolve(packageLocation, ep)),
|
|
31
|
-
entryPointStrategy: "expand",
|
|
32
|
-
out: tempDir,
|
|
33
|
-
plugin: ["typedoc-plugin-markdown"],
|
|
34
|
-
readme: "none",
|
|
35
|
-
theme: "markdown",
|
|
36
|
-
useCodeBlocks: true,
|
|
37
|
-
hidePageTitle: true,
|
|
38
|
-
githubPages: false,
|
|
39
|
-
hideGenerator: true,
|
|
40
|
-
hideBreadcrumbs: true,
|
|
41
|
-
disableSources: true,
|
|
42
|
-
skipErrorChecking: true,
|
|
43
|
-
excludeExternals: true,
|
|
44
|
-
excludeInternal: true,
|
|
45
|
-
excludePrivate: true,
|
|
46
|
-
sort: ["source-order"],
|
|
47
|
-
expandObjects: true,
|
|
48
|
-
expandParameters: true,
|
|
49
|
-
parametersFormat: "table",
|
|
50
|
-
propertiesFormat: "table",
|
|
51
|
-
enumMembersFormat: "table",
|
|
52
|
-
typeDeclarationFormat: "table",
|
|
53
|
-
indexFormat: "table",
|
|
54
|
-
tableColumnSettings: {
|
|
55
|
-
hideDefaults: false,
|
|
56
|
-
hideInherited: false,
|
|
57
|
-
hideModifiers: false,
|
|
58
|
-
hideOverrides: false,
|
|
59
|
-
hideSources: true
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
const typedocJsonPath = path.join(tempDir, "typedoc.json");
|
|
63
|
-
await writeFile(typedocJsonPath, JSON.stringify(typedocConfig, null, 2));
|
|
64
|
-
try {
|
|
65
|
-
console.log(`Generating docs for: ${packageLocation}`);
|
|
66
|
-
execSync(`npx typedoc --options ${typedocJsonPath}`, {
|
|
67
|
-
cwd: process.cwd(),
|
|
68
|
-
stdio: ["ignore", "pipe", "pipe"]
|
|
69
|
-
});
|
|
70
|
-
} catch (ex) {
|
|
71
|
-
const error = ex;
|
|
72
|
-
console.error(`TypeDoc error: ${error.message}`);
|
|
73
|
-
return "## Reference\n\nReference generation failed.";
|
|
74
|
-
}
|
|
75
|
-
return consolidateMarkdown(tempDir);
|
|
76
|
-
} catch (ex) {
|
|
77
|
-
const error = ex;
|
|
78
|
-
console.warn(`\u26A0\uFE0F Error generating TypeDoc for ${packageLocation}:`, error.message);
|
|
79
|
-
return "## Reference\n\nReference generation failed.";
|
|
80
|
-
} finally {
|
|
81
|
-
try {
|
|
82
|
-
await rm(tempDir, { recursive: true, force: true });
|
|
83
|
-
} catch (ex) {
|
|
84
|
-
const error = ex;
|
|
85
|
-
console.warn("\u26A0\uFE0F Failed to clean up temp directory:", error.message);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function consolidateMarkdown(tempDir) {
|
|
90
|
-
let consolidated = "## Reference\n\n";
|
|
91
|
-
const mainReadmePath = path.join(tempDir, "README.md");
|
|
92
|
-
if (existsSync(mainReadmePath)) {
|
|
93
|
-
const mainContent = readFileSync(mainReadmePath, "utf8").replace(/^---(.|\n)*?---\n/, "").replace(/^# .+\n/, "").replaceAll(/\]\((.+?)\.md\)/g, "](#$1)");
|
|
94
|
-
consolidated += mainContent + "\n\n";
|
|
95
|
-
}
|
|
96
|
-
function processDirectory(dir, level = 0) {
|
|
97
|
-
const indent = " ".repeat(level);
|
|
98
|
-
let content = "";
|
|
99
|
-
try {
|
|
100
|
-
const items = readdirSync(dir, { withFileTypes: true });
|
|
101
|
-
for (const item of items) {
|
|
102
|
-
const itemPath = path.join(dir, item.name);
|
|
103
|
-
if (item.isDirectory()) continue;
|
|
104
|
-
if (item.name === "README.md" || !item.name.endsWith(".md")) continue;
|
|
105
|
-
const fileContent = readFileSync(itemPath, "utf8").replace(/^---(.|\n)*?---\n/, "");
|
|
106
|
-
const moduleName = item.name.replace(".md", "");
|
|
107
|
-
content += `
|
|
108
|
-
|
|
109
|
-
${indent}### <a id="${moduleName}"></a>${moduleName}
|
|
110
|
-
|
|
111
|
-
`;
|
|
112
|
-
content += fileContent.replace(/^# .+\n/, "").replaceAll(/\]\((.+?)\.md\)/g, "](#$1)");
|
|
113
|
-
}
|
|
114
|
-
for (const item of items) {
|
|
115
|
-
if (item.isDirectory()) {
|
|
116
|
-
const subDirPath = path.join(dir, item.name);
|
|
117
|
-
if (item.name === "spec" || item.name.includes(".spec")) continue;
|
|
118
|
-
content += `
|
|
119
|
-
|
|
120
|
-
${indent}### ${item.name}
|
|
121
|
-
`;
|
|
122
|
-
content += processDirectory(subDirPath, level + 1);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
} catch (ex) {
|
|
126
|
-
const error = ex;
|
|
127
|
-
console.warn(`\u26A0\uFE0F Error processing directory ${dir}:`, error.message);
|
|
128
|
-
}
|
|
129
|
-
return content;
|
|
130
|
-
}
|
|
131
|
-
consolidated += processDirectory(tempDir);
|
|
132
|
-
consolidated = consolidated.replaceAll(/\n\n\n+/g, "\n\n").replaceAll(/^#### /gm, "### ").replaceAll(/^##### /gm, "#### ").replaceAll(/^###### /gm, "##### ");
|
|
133
|
-
return consolidated;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// src/generateReadmeFiles.ts
|
|
137
|
-
var dirName = () => path2.dirname(fileURLToPath2(import.meta.url));
|
|
138
|
-
var templatePath = () => path2.join(dirName(), "README.template.md");
|
|
139
|
-
function fillTemplate(template, data) {
|
|
140
|
-
const additionalData = { ...data, safeName: data.name.replaceAll("/", "__").replaceAll("@", "") };
|
|
141
|
-
return template.replaceAll(/{{(.*?)}}/g, (_, key) => additionalData[key.trim()] ?? "");
|
|
142
|
-
}
|
|
143
|
-
async function tryLoadReadmeBody(location) {
|
|
144
|
-
try {
|
|
145
|
-
return await readFile(path2.join(location, "README.body.md"), "utf8");
|
|
146
|
-
} catch {
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
async function tryLoadReadmeReference(location) {
|
|
151
|
-
try {
|
|
152
|
-
return await readFile(path2.join(location, "README.reference.md"), "utf8");
|
|
153
|
-
} catch {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
async function generateReadmeFiles(customTemplatePath) {
|
|
158
|
-
const template = await readFile(customTemplatePath ?? templatePath(), "utf8");
|
|
159
|
-
const pkgs = yarnWorkspaces();
|
|
160
|
-
for (const { location } of pkgs) {
|
|
161
|
-
try {
|
|
162
|
-
if (location.includes("wallet-chrome")) {
|
|
163
|
-
continue;
|
|
164
|
-
}
|
|
165
|
-
const pkgJsonPath = path2.join(location, "package.json");
|
|
166
|
-
const pkg = JSON.parse(await readFile(pkgJsonPath, "utf8"));
|
|
167
|
-
const body = await tryLoadReadmeBody(location) ?? "";
|
|
168
|
-
const reference = await tryLoadReadmeReference(location) ?? await generateTypeDoc(location, ["src/index*.ts"]);
|
|
169
|
-
const readmeContent = fillTemplate(template, {
|
|
170
|
-
...pkg,
|
|
171
|
-
body,
|
|
172
|
-
reference
|
|
173
|
-
});
|
|
174
|
-
await writeFile2(path2.join(location, "README.md"), readmeContent);
|
|
175
|
-
console.log(`\u2705 Created README.md for ${pkg.name}`);
|
|
176
|
-
} catch (ex) {
|
|
177
|
-
const error = ex;
|
|
178
|
-
console.warn(`\u26A0\uFE0F Skipped ${location}:`, error.message);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
export {
|
|
183
|
-
generateReadmeFiles
|
|
184
|
-
};
|
|
185
1
|
//# sourceMappingURL=index.mjs.map
|
package/dist/node/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/generateReadmeFiles.ts","../../src/generateTypeDoc.ts"],"sourcesContent":["#!/usr/bin/env node\n/* eslint-disable no-console */\n\n// generate-readmes.mjs\nimport { readFile, writeFile } from 'node:fs/promises'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nimport { yarnWorkspaces } from '@xylabs/ts-scripts-yarn3'\n\nimport { generateTypeDoc } from './generateTypeDoc.ts'\n\nconst dirName = () => path.dirname(fileURLToPath(import.meta.url))\nconst templatePath = () => path.join(dirName(), 'README.template.md')\n\n/**\n * Replaces `{{key}}` placeholders in a template string with values from the data object.\n * @param template - The template string containing `{{key}}` placeholders\n * @param data - A key-value map of replacement values\n * @returns The template with all placeholders replaced\n */\nfunction fillTemplate(template: string, data: { [key: string]: string }) {\n const additionalData: { [key: string]: string } = { ...data, safeName: data.name.replaceAll('/', '__').replaceAll('@', '') }\n return template.replaceAll(/{{(.*?)}}/g, (_, key) => additionalData[(key as string).trim()] ?? '')\n}\n\n/**\n * Attempts to load a `README.body.md` file from the given package location.\n * @param location - The package directory path\n * @returns The file contents, or undefined if the file does not exist\n */\nasync function tryLoadReadmeBody(location: string) {\n try {\n return await readFile(path.join(location, 'README.body.md'), 'utf8')\n } catch {\n return\n }\n}\n\n/**\n * Attempts to load a `README.reference.md` file from the given package location.\n * @param location - The package directory path\n * @returns The file contents, or undefined if the file does not exist\n */\nasync function tryLoadReadmeReference(location: string) {\n try {\n return await readFile(path.join(location, 'README.reference.md'), 'utf8')\n } catch {\n return\n }\n}\n\n/**\n * Generates README.md files for all workspace packages using a shared template.\n * Fills each README with package metadata, an optional body, and auto-generated TypeDoc reference.\n */\nexport async function generateReadmeFiles(customTemplatePath?: string) {\n const template = await readFile(customTemplatePath ?? templatePath(), 'utf8')\n const pkgs = yarnWorkspaces()\n\n for (const { location } of pkgs) {\n try {\n if (location.includes('wallet-chrome')) {\n continue\n }\n const pkgJsonPath = path.join(location, 'package.json')\n const pkg = JSON.parse(await readFile(pkgJsonPath, 'utf8'))\n const body = await tryLoadReadmeBody(location) ?? ''\n const reference = await tryLoadReadmeReference(location) ?? await generateTypeDoc(location, ['src/index*.ts'])\n const readmeContent = fillTemplate(template, {\n ...pkg, body, reference,\n })\n await writeFile(path.join(location, 'README.md'), readmeContent)\n console.log(`✅ Created README.md for ${pkg.name}`)\n } catch (ex) {\n const error = ex as Error\n console.warn(`⚠️ Skipped ${location}:`, error.message)\n }\n }\n}\n","/* eslint-disable no-console */\nimport { execSync } from 'node:child_process'\nimport {\n existsSync, mkdirSync, readdirSync,\n readFileSync,\n} from 'node:fs'\nimport { rm, writeFile } from 'node:fs/promises'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\n/**\n * Generates inline TypeDoc markdown documentation\n * @param {string} packageLocation - The package location path\n * @param {string} sourceGlob - The glob pattern for source files\n * @returns {Promise<string>} A markdown string containing Reference\n */\nexport async function generateTypeDoc(packageLocation: string, entryPoints: string[]) {\n const __dirname = path.dirname(fileURLToPath(import.meta.url))\n const tempDir = path.join(__dirname, '.temp-typedoc')\n\n console.log(`Generating TypeDoc for package at: ${packageLocation}`)\n for (const ep of entryPoints) {\n console.log(` - Entry point: ${path.resolve(packageLocation, ep)}`)\n }\n\n try {\n // Create temp directory if it doesn't exist\n if (!existsSync(tempDir)) {\n mkdirSync(tempDir, { recursive: true })\n }\n\n // Create a minimal TypeDoc config for markdown generation\n const typedocConfig = {\n entryPoints: entryPoints.map(ep => path.resolve(packageLocation, ep)),\n entryPointStrategy: 'expand',\n out: tempDir,\n plugin: ['typedoc-plugin-markdown'],\n readme: 'none',\n theme: 'markdown',\n useCodeBlocks: true,\n hidePageTitle: true,\n githubPages: false,\n hideGenerator: true,\n hideBreadcrumbs: true,\n disableSources: true,\n skipErrorChecking: true,\n excludeExternals: true,\n excludeInternal: true,\n excludePrivate: true,\n sort: ['source-order'],\n expandObjects: true,\n expandParameters: true,\n parametersFormat: 'table',\n propertiesFormat: 'table',\n enumMembersFormat: 'table',\n typeDeclarationFormat: 'table',\n indexFormat: 'table',\n tableColumnSettings: {\n hideDefaults: false,\n hideInherited: false,\n hideModifiers: false,\n hideOverrides: false,\n hideSources: true,\n },\n }\n\n // Create temporary typedoc.json file\n const typedocJsonPath = path.join(tempDir, 'typedoc.json')\n await writeFile(typedocJsonPath, JSON.stringify(typedocConfig, null, 2))\n\n // Run TypeDoc with the config\n try {\n console.log(`Generating docs for: ${packageLocation}`)\n execSync(`npx typedoc --options ${typedocJsonPath}`, {\n cwd: process.cwd(),\n stdio: ['ignore', 'pipe', 'pipe'],\n })\n } catch (ex) {\n const error = ex as Error\n console.error(`TypeDoc error: ${error.message}`)\n return '## Reference\\n\\nReference generation failed.'\n }\n\n // Combine all markdown files into a single document\n return consolidateMarkdown(tempDir)\n } catch (ex) {\n const error = ex as Error\n console.warn(`⚠️ Error generating TypeDoc for ${packageLocation}:`, error.message)\n return '## Reference\\n\\nReference generation failed.'\n } finally {\n // Clean up the temp directory\n try {\n await rm(tempDir, { recursive: true, force: true })\n } catch (ex) {\n const error = ex as Error\n console.warn('⚠️ Failed to clean up temp directory:', error.message)\n }\n }\n}\n\n/**\n * Consolidates all markdown files in the TypeDoc output directory into a single markdown string\n * @param {string} tempDir - The temporary directory containing TypeDoc output\n * @returns {string} - Consolidated markdown content\n */\nfunction consolidateMarkdown(tempDir: string) {\n // Start with the main README content\n let consolidated = '## Reference\\n\\n'\n\n // Read main README.md first (if it exists)\n const mainReadmePath = path.join(tempDir, 'README.md')\n if (existsSync(mainReadmePath)) {\n const mainContent = readFileSync(mainReadmePath, 'utf8')\n .replace(/^---(.|\\n)*?---\\n/, '') // Remove front matter\n .replace(/^# .+\\n/, '') // Remove top-level header\n .replaceAll(/\\]\\((.+?)\\.md\\)/g, '](#$1)') // Fix internal links to use anchors\n\n consolidated += mainContent + '\\n\\n'\n }\n\n // Function to process a directory recursively\n function processDirectory(dir: string, level = 0): string {\n const indent = ' '.repeat(level)\n let content = ''\n\n try {\n const items = readdirSync(dir, { withFileTypes: true })\n\n // Process files first\n for (const item of items) {\n const itemPath = path.join(dir, item.name)\n\n // Skip directories for now (process them later)\n if (item.isDirectory()) continue\n\n // Skip README.md (already processed) and files that aren't markdown\n if (item.name === 'README.md' || !item.name.endsWith('.md')) continue\n\n // Read file content\n const fileContent = readFileSync(itemPath, 'utf8')\n .replace(/^---(.|\\n)*?---\\n/, '') // Remove front matter\n\n // Get the module name from filename (without extension)\n const moduleName = item.name.replace('.md', '')\n\n // Create a header with anchor\n content += `\\n\\n${indent}### <a id=\"${moduleName}\"></a>${moduleName}\\n\\n`\n\n // Add file content with fixed links\n content += fileContent\n .replace(/^# .+\\n/, '') // Remove top-level header\n .replaceAll(/\\]\\((.+?)\\.md\\)/g, '](#$1)') // Fix internal links to use anchors\n }\n\n // Process subdirectories\n for (const item of items) {\n if (item.isDirectory()) {\n const subDirPath = path.join(dir, item.name)\n // Skip spec directories\n if (item.name === 'spec' || item.name.includes('.spec')) continue\n\n // Create a header for the directory\n content += `\\n\\n${indent}### ${item.name}\\n`\n\n // Process the subdirectory\n content += processDirectory(subDirPath, level + 1)\n }\n }\n } catch (ex) {\n const error = ex as Error\n console.warn(`⚠️ Error processing directory ${dir}:`, error.message)\n }\n\n return content\n }\n\n // Process all files in the tempDir\n consolidated += processDirectory(tempDir)\n\n // Clean up the markdown (fix duplicate headers, etc.)\n consolidated = consolidated\n .replaceAll(/\\n\\n\\n+/g, '\\n\\n') // Remove excess newlines\n .replaceAll(/^#### /gm, '### ') // Adjust heading levels\n .replaceAll(/^##### /gm, '#### ') // Adjust heading levels\n .replaceAll(/^###### /gm, '##### ') // Adjust heading levels\n\n return consolidated\n}\n"],"mappings":";AAIA,SAAS,UAAU,aAAAA,kBAAiB;AACpC,OAAOC,WAAU;AACjB,SAAS,iBAAAC,sBAAqB;AAE9B,SAAS,sBAAsB;;;ACP/B,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EAAY;A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K,EAAE;AACnG;AAOA,eAAe,kBAAkB,UAAkB;AACjD,MAAI;AACF,WAAO,MAAM,SAASA,MAAK,KAAK,UAAU,gBAAgB,GAAG,MAAM;AAAA,EACrE,QAAQ;AACN;AAAA,EACF;AACF;AAOA,eAAe,uBAAuB,UAAkB;AACtD,MAAI;AACF,WAAO,MAAM,SAASA,MAAK,KAAK,UAAU,qBAAqB,GAAG,MAAM;AAAA,EAC1E,QAAQ;AACN;AAAA,EACF;AACF;AAMA,eAAsB,oBAAoB,oBAA6B;AACrE,QAAM,WAAW,MAAM,SAAS,sBAAsB,aAAa,GAAG,MAAM;AAC5E,QAAM,OAAO,eAAe;AAE5B,aAAW,EAAE,SAAS,KAAK,MAAM;AAC/B,QAAI;AACF,UAAI,SAAS,SAAS,eAAe,GAAG;AACtC;AAAA,MACF;AACA,YAAM,cAAcA,MAAK,KAAK,UAAU,cAAc;AACtD,YAAM,MAAM,KAAK,MAAM,MAAM,SAAS,aAAa,MAAM,CAAC;AAC1D,YAAM,OAAO,MAAM,kBAAkB,QAAQ,KAAK;AAClD,YAAM,YAAY,MAAM,uBAAuB,QAAQ,KAAK,MAAM,gBAAgB,UAAU,CAAC,eAAe,CAAC;AAC7G,YAAM,gBAAgB,aAAa,UAAU;AAAA,QAC3C,GAAG;AAAA,QAAK;AAAA,QAAM;AAAA,MAChB,CAAC;AACD,YAAME,WAAUF,MAAK,KAAK,UAAU,WAAW,GAAG,aAAa;AAC/D,cAAQ,IAAI,gCAA2B,IAAI,IAAI,EAAE;AAAA,IACnD,SAAS,IAAI;AACX,YAAM,QAAQ;AACd,cAAQ,KAAK,wBAAc,QAAQ,KAAK,MAAM,OAAO;AAAA,IACvD;AAAA,EACF;AACF;","names":["writeFile","path","fileURLToPath","path","fileURLToPath","writeFile"]}
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/readme-gen",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.91",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"readme",
|
|
@@ -41,15 +41,18 @@
|
|
|
41
41
|
"dist",
|
|
42
42
|
"!**/*.bench.*",
|
|
43
43
|
"!**/*.spec.*",
|
|
44
|
-
"!**/*.test.*"
|
|
44
|
+
"!**/*.test.*",
|
|
45
|
+
"README.md"
|
|
45
46
|
],
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"@xylabs/ts-scripts-pnpm": "~7.5.4"
|
|
48
|
-
},
|
|
49
47
|
"devDependencies": {
|
|
50
|
-
"@xylabs/
|
|
51
|
-
"
|
|
52
|
-
"
|
|
48
|
+
"@xylabs/ts-scripts-common": "~7.6.2",
|
|
49
|
+
"@xylabs/ts-scripts-yarn3": "^7.6.2",
|
|
50
|
+
"@xylabs/tsconfig": "~7.6.2",
|
|
51
|
+
"typescript": "^5"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@types/node": "*",
|
|
55
|
+
"typescript": "~5"
|
|
53
56
|
},
|
|
54
57
|
"engines": {
|
|
55
58
|
"node": ">=18"
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Generates README.md files for all workspace packages using a shared template.
|
|
4
|
-
* Fills each README with package metadata, an optional body, and auto-generated TypeDoc reference.
|
|
5
|
-
*/
|
|
6
|
-
export declare function generateReadmeFiles(customTemplatePath?: string): Promise<void>;
|
|
7
|
-
//# sourceMappingURL=generateReadmeFiles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generateReadmeFiles.d.ts","sourceRoot":"","sources":["../../src/generateReadmeFiles.ts"],"names":[],"mappings":";AAoDA;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,kBAAkB,CAAC,EAAE,MAAM,iBAuBpE"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generates inline TypeDoc markdown documentation
|
|
3
|
-
* @param {string} packageLocation - The package location path
|
|
4
|
-
* @param {string} sourceGlob - The glob pattern for source files
|
|
5
|
-
* @returns {Promise<string>} A markdown string containing Reference
|
|
6
|
-
*/
|
|
7
|
-
export declare function generateTypeDoc(packageLocation: string, entryPoints: string[]): Promise<string>;
|
|
8
|
-
//# sourceMappingURL=generateTypeDoc.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generateTypeDoc.d.ts","sourceRoot":"","sources":["../../src/generateTypeDoc.ts"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,mBAkFnF"}
|