[rush] Allow custom commands with pass-through parameters
I'm trying to integrate knip in our rush repo, and while it's mostly going fine, the custom command I'm using to invoke it is just knip. I would like to be able to pass in any of knip's CLI arguments to it when I invoke, and listing them manually seems like a crazy exercise.
It'd be possible to add an option in command-line.json to allow "remainder" parameters to be passed to a bulk process. ts-command-line supports this, but it isn't exposed in Rush.
Would you be interested in adding this feature?
Meh, maybe. I have very little time/energy to spend on open source, but inspiration could struck and this sounds like it wouldn't take more than an hour. Can you point to a good file to start with for me or whoever takes this?
(BTW, the command is global, not bulk, but I imagine it can be implemented and useful for both)
@Faithfinder can you please share your config setup to integrate knip with rush? Did you use a rush command? Did you have a single knip config file?
@Faithfinder can you please share your config setup to integrate knip with rush? Did you use a rush command? Did you have a single knip config file?
Single file, yes, but I can't share the config as I'm not in that job anymore. Wasn't anything tricky, just ignore rush's config folders and expand entry files in individual projects as needed.
@iclanton could you advise where to make such changes? I'd be happy to file a PR for this but need a bit of guidance as to where to look at this integration.
Our CLI parsing library (@rushstack/ts-command-line) already has support for getting the remaining values, so on the Rush side, it'll involve adding option(s) to command-line.json (look for things that use command-line.schema.json) and then plumbing them through to the command objects that get created when a Rush process boots up.