fix: ensure CLI correctly handles kebab-case options
- Fixed CLI wrapper to convert camelCase options to kebab-case when passing to dev.js - Added explicit support for --input option in parse-prd command - Updated commands.mdc to clarify Commander.js camelCase/kebab-case behavior
This commit is contained in:
@@ -50,6 +50,8 @@ alwaysApply: false
|
||||
.option('-p, --path <dir>', 'Output directory') // Should be --output
|
||||
```
|
||||
|
||||
> **Note**: Although options are defined with kebab-case (`--num-tasks`), Commander.js stores them internally as camelCase properties. Access them in code as `options.numTasks`, not `options['num-tasks']`.
|
||||
|
||||
## Input Validation
|
||||
|
||||
- **Required Parameters**:
|
||||
|
||||
@@ -133,7 +133,7 @@ For features requiring components in multiple modules:
|
||||
|
||||
- **Naming Conventions**:
|
||||
- Use kebab-case for command names (`analyze-complexity`, not `analyzeComplexity`)
|
||||
- Use camelCase for option names (`--outputFormat`, not `--output-format`)
|
||||
- Use kebab-case for option names (`--output-format`, not `--outputFormat`)
|
||||
- Use the same option names across commands when they represent the same concept
|
||||
|
||||
- **Command Structure**:
|
||||
|
||||
Reference in New Issue
Block a user