(serialized_args: string[]): string import {print_command_args} from '@fuzdev/gro/args.js'; serialized_args
string[]returns
string 6 declarations
(serialized_args: string[]): string import {print_command_args} from '@fuzdev/gro/args.js'; serialized_argsstring[]string (command: string, raw_rest_args?: string[] | undefined, cache?: Record<string, Args | undefined>): Args import {to_forwarded_args} from '@fuzdev/gro/args.js'; Parses process.argv for the specified command, so given
gro taskname arg1 --arg2 -- eslint eslintarg1 --eslintarg2 -- tsc --tscarg1 --tscarg2
the command 'eslint' returns eslintarg1 --eslintarg2
and 'tsc' returns --tscarg1 and --tscarg2.
commandstringraw_rest_args?string[] | undefinedcacheRecord<string, Args | undefined>to_forwarded_args_by_command(raw_rest_args)Args (raw_rest_args?: string[]): Record<string, Args | undefined> import {to_forwarded_args_by_command} from '@fuzdev/gro/args.js'; raw_rest_argsstring[]to_raw_rest_args()Record<string, Args | undefined> (command_to_strip?: string | undefined, raw_rest_args?: string[]): Args import {to_implicit_forwarded_args} from '@fuzdev/gro/args.js'; Gets all args after the first -- without assuming a command name.
This is useful for tasks that want to forward args directly to a tool
without requiring users to specify the tool name explicitly.
Optionally strips a specific command name if present for backward compatibility.
command_to_strip?string | undefinedraw_rest_argsstring[]to_raw_rest_args()Args // `gro test -- --watch` → {watch: true}
// `gro test -- foo.test.ts` → {_: ['foo.test.ts']}
// `gro test -- vitest --watch` with command_to_strip='vitest' → {watch: true}
to_implicit_forwarded_args('vitest')(argv?: string[]): string[] import {to_raw_rest_args} from '@fuzdev/gro/args.js'; Gets the array of raw string args starting with the first --, if any.
argvstring[]process.argvstring[] (argv?: string[]): { task_name: string; args: Args; } import {to_task_args} from '@fuzdev/gro/args.js'; Parses task_name and args from process.argv,
ignoring anything after any --.
argvstring[]process.argv{ task_name: string; args: Args; }