mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-22 21:30:44 +02:00
feat(auto-start): introduce a builder (#2569)
* feat(auto-start): introduce a builder * Update examples * Fix missing end --- in change file * Fix missing self. * Update .changes/autostart-builder.md Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com> --------- Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
This commit is contained in:
@@ -57,11 +57,9 @@ First you need to register the core plugin with Tauri:
|
||||
`src-tauri/src/lib.rs`
|
||||
|
||||
```rust
|
||||
use tauri_plugin_autostart::MacosLauncher;
|
||||
|
||||
fn main() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_autostart::init(MacosLauncher::LaunchAgent, Some(vec!["--flag1", "--flag2"]) /* arbitrary number of args to pass to your app */))
|
||||
.plugin(tauri_plugin_autostart::Builder::new().args((["--flag1", "--flag2"])).build()))
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user