Volt Developer CLI#
Development tools for the Volt.js project. Uses:
commanderfor command-line parsingchalkfor colored output- TypeScript Compiler API for parsing source files
Installation#
From the project root:
pnpm install
The volt command will be available after installation.
Commands#
volt docs#
Generates API documentation from TypeScript source files.
- Scans all
.tsfiles insrc/ - Extracts JSDoc comments and type signatures
- Outputs markdown files to
docs/api/ - Supports
@exampletags in JSDoc
Generated documentation includes:
- Function signatures and descriptions
- Interface definitions and members
- Type aliases
- Code examples from
@exampletags
volt stats#
Displays lines of code statistics.
- Default: counts code in
src/only - Excludes JSDoc comments, single-line comments, and empty lines
- Use
--fullto include test files
Outputs:
- Total files
- Total lines (including comments)
- Code lines (excluding docs/comments)
- Documentation/comment lines
Development#
Build#
pnpm build
Compiles TypeScript to dist/ using tsdown.
Test#
pnpm test # Watch mode
pnpm test:run # Single run
Type Check#
pnpm typecheck