UNPKG

markmv

Version:

TypeScript CLI for markdown file operations with intelligent link refactoring

62 lines 2.12 kB
/** * Configuration options for join command operations. * * Controls how multiple markdown files are combined into a single file, including ordering * strategy, output location, and preview mode. * * @category Commands */ export interface JoinOptions { /** Output file path for the joined content */ output?: string; /** Perform a dry run without making actual changes */ dryRun?: boolean; /** Strategy for ordering content when joining files */ orderStrategy?: 'alphabetical' | 'manual' | 'dependency' | 'chronological'; /** Enable verbose output with detailed progress information */ verbose?: boolean; } /** * Execute the join command to combine multiple markdown files into a single file. * * This command provides intelligent joining of markdown files with configurable ordering strategies * and automatic link refactoring. It supports: * * - Multiple ordering strategies (dependency, alphabetical, chronological, manual) * - Custom output file specification * - Dry run mode for previewing changes * - Automatic link updates and integrity validation * - Header conflict resolution and frontmatter merging * * The join operation automatically updates all cross-references to reflect the new unified file * structure and maintains link integrity throughout the project. * * @category Commands * * @example * Basic file joining * ```typescript * await joinCommand(['intro.md', 'content.md', 'conclusion.md'], { * output: 'complete-guide.md', * orderStrategy: 'dependency' * }); * ``` * * @example * Dry run with verbose output * ```typescript * await joinCommand(['docs/*.md'], { * output: 'handbook.md', * dryRun: true, * verbose: true, * orderStrategy: 'alphabetical' * }); * ``` * * @param files - Array of markdown file paths to join together * @param options - Configuration options for the join operation * * @throws Will exit the process with code 1 if the operation fails */ export declare function joinCommand(files: string[], options: JoinOptions): Promise<void>; //# sourceMappingURL=join.d.ts.map