Open kazupon opened 3 months ago
Hi. Sure we can think of some kind of text AST structure to allow hooking into and modifying the output 👍🏼
In the rolldown use case, we would like to customize only the header.
I want to investigate this first although. Can you share the desired header change? If it is more beautiful, i am up to simply update the default usage to it so not going to the customization path :)
I want to investigate this first although. Can you share the desired header change? If it is more beautiful, i am up to simply update the default usage to it so not going to the customization path :)
@pi0 Thanks!
rolldown header test is here:
rolldown 0.10.1 - Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.
rolldown header image is here:
rolldown cli is a layout and color adjustment for the header customization.
Originally posted by @pi0 in https://github.com/unjs/citty/issues/135#issuecomment-2043033387
The
showUsage
currently provided can be customized with own customizedshowUsage
inrunMain
, but there is no way to customize the built-inshowUsage
that citty has.The
showUsage
renders the following parts viarenderUsage
.It would be useful to have a mechanism to custom render each of these parts, so that the logic of
showUsage
does not have to be reused.In the rolldown use case, we would like to customize only the header.