Skip to content

Commit b60c31e

Browse files
committed
feat: add TypeDoc @group annotations and configuration enhancements
- Update typedoc.markdown.json with multiple entry points and categorization - Add @group annotations to core API functions in src/index.ts - Add @group annotations to command functions in src/commands/ - Enable excludeNotDocumented and categorizeByGroup options - Improve JSDoc documentation with bash examples - Configure category ordering for better documentation structure
1 parent 600e7ec commit b60c31e

File tree

4 files changed

+51
-13
lines changed

4 files changed

+51
-13
lines changed

src/commands/convert.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export interface ConvertOptions {
5050
*
5151
* // Recursive directory processing
5252
* await expandSourcePatterns(['docs/'], { recursive: true });
53-
* ```;
53+
* ```
5454
*
5555
* @param patterns - Array of file patterns, paths, or directories to expand
5656
* @param options - Conversion options including recursive processing
@@ -224,7 +224,7 @@ function printConvertSummary(
224224
* Processes markdown files to convert link formats and path resolution according to specified
225225
* options. Supports dry run mode, verbose output, and various conversion strategies.
226226
*
227-
* @category Commands
227+
* @group Commands
228228
*
229229
* @example
230230
* ```bash
@@ -236,7 +236,7 @@ function printConvertSummary(
236236
*
237237
* # Dry run with verbose output
238238
* markmv convert README.md --link-style claude --dry-run --verbose
239-
* ```;
239+
* ```
240240
*
241241
* @param patterns - File patterns to process (supports globs)
242242
* @param options - Command options specifying conversion parameters

src/commands/index.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,29 @@ interface IndexCliOptions {
104104
boundary?: string;
105105
}
106106

107+
/**
108+
* CLI command handler for generating documentation indexes.
109+
*
110+
* Creates organized documentation indexes from markdown files using various strategies.
111+
* Supports multiple index types including links, imports, embeds, and hybrid modes.
112+
*
113+
* @group Commands
114+
*
115+
* @example
116+
* ```bash
117+
* # Generate a links-based index
118+
* markmv index --type links --strategy directory
119+
*
120+
* # Generate with custom template
121+
* markmv index docs/ --type hybrid --template custom.md
122+
*
123+
* # Dry run with verbose output
124+
* markmv index --dry-run --verbose
125+
* ```
126+
*
127+
* @param directory - Target directory for index generation
128+
* @param cliOptions - Command options specifying index parameters
129+
*/
107130
export async function indexCommand(
108131
directory: string | undefined,
109132
cliOptions: IndexCliOptions

src/index.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,15 @@ export type {
130130
* Creates a new FileOperations instance for performing markdown file operations. This is the
131131
* recommended way to get started with the library.
132132
*
133+
* @group Core API
134+
*
133135
* @example
134136
* ```typescript
135137
* import { createMarkMv } from 'markmv';
136138
*
137139
* const markmv = createMarkMv();
138140
* const result = await markmv.moveFile('old.md', 'new.md');
139-
* ```;
141+
* ```
140142
*
141143
* @returns A new FileOperations instance
142144
*/
@@ -147,14 +149,16 @@ export function createMarkMv(): FileOperations {
147149
/**
148150
* Convenience function for moving a single markdown file
149151
*
152+
* @group Core API
153+
*
150154
* @example
151155
* ```typescript
152156
* import { moveFile } from 'markmv';
153157
*
154158
* const result = await moveFile('docs/old.md', 'docs/new.md', {
155159
* dryRun: true
156160
* });
157-
* ```;
161+
* ```
158162
*
159163
* @param sourcePath - The current file path
160164
* @param destinationPath - The target file path
@@ -174,6 +178,8 @@ export async function moveFile(
174178
/**
175179
* Convenience function for moving multiple markdown files
176180
*
181+
* @group Core API
182+
*
177183
* @example
178184
* ```typescript
179185
* import { moveFiles } from 'markmv';
@@ -182,7 +188,7 @@ export async function moveFile(
182188
* { source: 'old1.md', destination: 'new1.md' },
183189
* { source: 'old2.md', destination: 'new2.md' }
184190
* ]);
185-
* ```;
191+
* ```
186192
*
187193
* @param moves - Array of source/destination pairs
188194
* @param options - Optional configuration
@@ -200,6 +206,8 @@ export async function moveFiles(
200206
/**
201207
* Convenience function for validating markdown file operations
202208
*
209+
* @group Core API
210+
*
203211
* @example
204212
* ```typescript
205213
* import { moveFile, validateOperation } from 'markmv';

typedoc.markdown.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
{
22
"$schema": "https://typedoc.org/schema.json",
33
"plugin": ["typedoc-plugin-markdown"],
4-
"entryPoints": ["src/index.ts"],
4+
"entryPoints": ["src/index.ts", "src/commands/convert.ts", "src/commands/index.ts"],
55
"out": "docs-markdown",
66
"name": "markmv",
77
"includeVersion": true,
88
"excludePrivate": true,
99
"excludeProtected": false,
1010
"excludeInternal": false,
11-
"readme": "none",
11+
"excludeNotDocumented": true,
12+
"readme": "templates/README-for-typedoc.md",
1213
"gitRevision": "main",
1314
"gitRemote": "origin",
1415
"sourceLinkTemplate": "https://github.com/ExaDev/markmv/blob/{gitRevision}/{path}#L{line}",
1516
"categorizeByGroup": true,
1617
"defaultCategory": "Other",
1718
"categoryOrder": [
18-
"Core",
19+
"Core API",
1920
"Commands",
2021
"Strategies",
2122
"Types",
@@ -34,16 +35,22 @@
3435
"**/*.test.ts",
3536
"**/*.spec.ts",
3637
"**/cli.ts",
38+
"**/mcp-server.ts",
39+
"**/api-server.ts",
3740
"node_modules/**/*"
3841
],
3942
"externalPattern": [
4043
"**/node_modules/**"
4144
],
42-
"outputFileStrategy": "members",
43-
"mergeReadme": false,
44-
"hidePageHeader": false,
45+
"outputFileStrategy": "modules",
46+
"mergeReadme": true,
47+
"hidePageHeader": true,
4548
"hideBreadcrumbs": true,
46-
"hidePageTitle": false,
49+
"hidePageTitle": true,
50+
"useCodeBlocks": true,
51+
"expandParameters": true,
52+
"outputFileStrategy": "modules",
53+
"flattenOutputFiles": true,
4754
"titleLink": "https://github.com/ExaDev/markmv",
4855
"navigationLinks": {
4956
"GitHub": "https://github.com/ExaDev/markmv",

0 commit comments

Comments
 (0)