evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a command-line interface tool that processes JavaScript source files and generates documentation output based on different command modes.
The tool should accept command-line arguments and process them to determine the operation mode and options.
--help flag displays usage information and exits @test--version flag displays version number and exits @test--clear flag clears cached data and displays confirmation message @testThe tool should support loading configuration from multiple sources with proper precedence.
.jsdoc2md.json file if it exists @testpackage.json jsdoc2md property if it exists @testThe tool should support outputting structured data in JSON format for debugging and integration purposes.
--json flag outputs template data in JSON format @test--config flag displays the merged configuration settings @test// Main CLI entry point
// Processes command-line arguments and executes appropriate command
// Usage: node cli.js [options] [files...]
//
// Options:
// --help Display help information
// --version Display version number
// --clear Clear cache
// --json Output template data as JSON
// --config Display merged configuration
//
// Returns: exits with code 0 on success, non-zero on errorProvides documentation generation functionality including render, getTemplateData, clear cache operations, and configuration management.