@tauri-apps/plugin-cli
Parse arguments from your Command Line Interface.
Interfaces
ArgMatch
Since
2.0.0
Properties
Property | Type | Description |
---|---|---|
occurrences | number | Number of occurrences |
value | null | string | boolean | string [] | string if takes value boolean if flag string[] or null if takes multiple values |
CliMatches
Since
2.0.0
Properties
Property | Type |
---|---|
args | Record <string , ArgMatch > |
subcommand | null | SubcommandMatch |
SubcommandMatch
Since
2.0.0
Properties
Property | Type |
---|---|
matches | CliMatches |
name | string |
Functions
getMatches()
Parse the arguments provided to the current process and get the matches using the configuration defined tauri.cli
in tauri.conf.json
Returns
Example
Since
2.0.0
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/cli/guest-js/index.ts#L66
© 2024 Tauri Contributors. CC-BY / MIT