-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(features): Add single instance page #1931
docs(features): Add single instance page #1931
Conversation
✅ Deploy Preview for tauri-docs-starlight ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
This PR is ready to be reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks amazing, just made some suggestions to make it look closer to the other feature documentation pages
@simonhyll @FabianLars do we have a standard for documenting features? I see there's a bunch of patterns for documenting how a plugin can be installed (via the tauri CLI vs manually crates.io vs manually git)
Co-authored-by: Lucas Fernandes Nogueira <[email protected]>
Co-authored-by: Lucas Fernandes Nogueira <[email protected]>
## Usage | ||
|
||
To use this plugin, you need to register the core plugin with Tauri. The plugin init() method takes a closure that is called when a new app instance was started, but closed by the plugin. The closure has three arguments: the AppHandle, the list of arguments (important for instance on deep link usage) and the current working directory: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(important for instance on deep link usage)
as this is being mentioned, it could be explained why in a aside, without diving too much. Since this was Lucas' suggestions, I'll tag him to give us a hand @lucasfernog could you help on these?
the plugin takes a closure that is called when a new app instance was started, but closed by the plugin
this is a byte ambiguous
## Usage | ||
|
||
To use this plugin, you need to register the core plugin with Tauri. The plugin init() method takes a closure that is called when a new app instance was started, but closed by the plugin. The closure has three arguments: the AppHandle, the list of arguments (important for instance on deep link usage) and the current working directory: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General idea (you can use Starlight steps component) if you choose to do like this
Usage
- register the core plugin with Tauri.
// show how
- the plugin takes a closure that is called when a new app instance was started, but closed by the plugin. It has three arguments:
- app, being the AppHandle,
- args: the list of arguments
- cwd the current working directory (what should it default to?)
:::note
why args is important for instance on deep link usage
:::
// maybe show only the line highlighting app, agrs, cwd
// .plugin(tauri_plugin_single_instance::init(|app, args, cwd| {}))
Hi, up for review again! Thanks a lot for your valuable suggestions. |
Co-authored-by: Vitor Ayres <[email protected]>
What kind of changes does this PR include?
Description