feat: add API example (#317)

This commit is contained in:
Lucas Fernandes Nogueira
2023-05-05 09:41:17 -03:00
committed by GitHub
parent be1c775b8d
commit 5015132ece
98 changed files with 10334 additions and 156 deletions
+29
View File
@@ -0,0 +1,29 @@
<script>
import { getMatches } from "tauri-plugin-cli-api";
export let onMessage;
function cliMatches() {
getMatches().then(onMessage).catch(onMessage);
}
</script>
<p>
This binary can be run from the terminal and takes the following arguments:
<code class="code-block flex flex-wrap my-2">
<pre>
--config &lt;PATH&gt;
--theme &lt;light|dark|system&gt;
--verbose</pre>
</code>
Additionally, it has a <code>update --background</code> subcommand.
</p>
<br />
<div class="note">
Note that the arguments are only parsed, not implemented.
</div>
<br />
<br />
<button class="btn" id="cli-matches" on:click={cliMatches}>
Get matches
</button>