Skip to content

Relevant Files ​

  • scripts/generate-llms-txt.js - Main CLI script for processing VitePress documentation into llms.txt files
  • scripts/generate-llms-txt.test.js - Unit tests for the main CLI script
  • lib/vitepress-parser.js - Module for parsing VitePress config.js and extracting sidebar structure (updated with logging integration)
  • lib/vitepress-parser.test.js - Unit tests for VitePress configuration parsing
  • lib/logger.js - Comprehensive logging infrastructure with error handling, custom error classes, and performance timing
  • lib/version-validator.js - Version parameter validation and processing with support for latest/all keywords
  • lib/markdown-processor.js - Module for processing markdown files, includes, and transformations
  • lib/markdown-processor.test.js - Unit tests for markdown processing functionality
  • lib/template-generator.js - Module for generating section templates with contextual metadata
  • lib/template-generator.test.js - Unit tests for template generation
  • lib/file-utils.js - Utility functions for file operations and path resolution
  • lib/file-utils.test.js - Unit tests for file utility functions
  • scripts/generate-llms-txt.js - Main CLI script with comprehensive option handling and workflow orchestration
  • docs/README-vitepress-llms-concatenator.md - Complete documentation with usage examples and architecture details
  • package.json - Updated with new scripts and dependencies (commander package, ES modules support, CLI scripts)

Notes ​

  • Unit tests should typically be placed alongside the code files they are testing
  • Use npm test or yarn test to run the full test suite
  • Use npm test -- --testPathPattern=filename to run specific test files
  • The main CLI script will be executable via yarn generate-llms-txt [version]

Tasks ​

  • 1.0 Set up CLI Infrastructure and Configuration Parsing
    • 1.1 Create basic CLI script structure with argument parsing
    • 1.2 Set up project dependencies and package.json scripts
    • 1.3 Implement VitePress config.js parsing for sidebar structure
    • 1.4 Add basic error handling and logging infrastructure
    • 1.5 Create version parameter validation and processing
  • 2.0 Implement Markdown Content Processing and Transformations
  • 3.0 Build Section Template System
  • 4.0 Create Output Generation and File Management
  • 5.0 Add Testing Coverage and Documentation