update doc for desktop-only plugins

pull/381/head
Lucas Nogueira 2 years ago
parent 42bfde02f8
commit 1eddf04d88
No known key found for this signature in database
GPG Key ID: FFEA6C72E73482F1

@ -2,6 +2,8 @@
Use hardware security-keys in your Tauri App.
- Supported platforms: Windows, Linux, FreeBSD, NetBSD, OpenBSD, and macOS.
## Install
_This plugin requires a Rust version of at least **1.65**_
@ -17,7 +19,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
`src-tauri/Cargo.toml`
```toml
[dependencies]
# you can add the dependencies on the `[dependencies]` section if you do not target mobile
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-authenticator = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-authenticator = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
@ -54,7 +57,11 @@ First you need to register the core plugin with Tauri:
```rust
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_authenticator::init())
.setup(|app| {
#[cfg(desktop)]
app.handle().plugin(tauri_plugin_authenticator::init())?;
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

@ -2,6 +2,8 @@
Parse arguments from your Command Line Interface.
- Supported platforms: Windows, Linux and macOS.
## Install
_This plugin requires a Rust version of at least **1.65**_
@ -17,7 +19,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
`src-tauri/Cargo.toml`
```toml
[dependencies]
# you can add the dependencies on the `[dependencies]` section if you do not target mobile
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-cli = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-cli = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
@ -51,7 +54,11 @@ First you need to register the core plugin with Tauri:
```rust
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_cli::init())
.setup(|app| {
#[cfg(desktop)]
app.handle().plugin(tauri_plugin_cli::init())?;
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

@ -2,6 +2,8 @@
Register global shortcuts.
- Supported platforms: Windows, Linux and macOS.
## Install
_This plugin requires a Rust version of at least **1.65**_
@ -17,7 +19,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
`src-tauri/Cargo.toml`
```toml
[dependencies]
# you can add the dependencies on the `[dependencies]` section if you do not target mobile
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-global-shortcut = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-shortcut = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
@ -51,7 +54,11 @@ First you need to register the core plugin with Tauri:
```rust
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_shortcut::init())
.setup(|app| {
#[cfg(desktop)]
app.handle().plugin(tauri_plugin_shortcut::init())?;
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

@ -2,6 +2,8 @@
In-app updates for Tauri applications.
- Supported platforms: Windows, Linux and macOS.
## Install
_This plugin requires a Rust version of at least **1.65**_
@ -17,7 +19,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
`src-tauri/Cargo.toml`
```toml
[dependencies]
# you can add the dependencies on the `[dependencies]` section if you do not target mobile
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-updater = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-updater = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
@ -51,7 +54,11 @@ First you need to register the core plugin with Tauri:
```rust
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_updater::Builder::new().build())
.setup(|app| {
#[cfg(desktop)]
app.handle().plugin(tauri_plugin_updater::Builder::new().build())?;
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

Loading…
Cancel
Save