chore: prepare to move to tauri-apps org

pull/72/head
amrbashir 3 years ago
parent add9aff3ea
commit 94cdabba25
No known key found for this signature in database
GPG Key ID: BBD7A47A2003FF33

@ -1,5 +1,5 @@
{ {
"gitSiteUrl": "https://www.github.com/your-org/tauri-plugin-single-instance/", "gitSiteUrl": "https://www.github.com/tauri-apps/tauri-plugin-single-instance/",
"pkgManagers": { "pkgManagers": {
"rust": { "rust": {
"version": true, "version": true,
@ -10,7 +10,7 @@
"dryRunCommand": true "dryRunCommand": true
}, },
{ {
"command": "echo \"# Cargo Publish\"", "command": "echo '<details>\n<summary><em><h4>Cargo Publish</h4></em></summary>\n\n```'",
"dryRunCommand": true, "dryRunCommand": true,
"pipe": true "pipe": true
}, },
@ -25,7 +25,7 @@
"pipe": true "pipe": true
}, },
{ {
"command": "echo \"\\`\\`\\`\"", "command": "echo '```\n\n</details>\n'",
"dryRunCommand": true, "dryRunCommand": true,
"pipe": true "pipe": true
} }
@ -38,4 +38,4 @@
"manager": "rust" "manager": "rust"
} }
} }
} }

@ -1,5 +0,0 @@
---
"tauri-plugin-single-instance": "minor"
---
Initial release.

@ -6,9 +6,7 @@ mod platform_impl;
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
#[path = "platform_impl/linux.rs"] #[path = "platform_impl/linux.rs"]
mod platform_impl; mod platform_impl;
#[cfg(target_os = "macos")]
#[path = "platform_impl/macos.rs"]
mod platform_impl;
pub(crate) type SingleInstanceCallback<R> = pub(crate) type SingleInstanceCallback<R> =
dyn FnMut(&AppHandle<R>, Vec<String>, String) + Send + Sync + 'static; dyn FnMut(&AppHandle<R>, Vec<String>, String) + Send + Sync + 'static;
@ -16,5 +14,6 @@ pub(crate) type SingleInstanceCallback<R> =
pub fn init<R: Runtime, F: FnMut(&AppHandle<R>, Vec<String>, String) + Send + Sync + 'static>( pub fn init<R: Runtime, F: FnMut(&AppHandle<R>, Vec<String>, String) + Send + Sync + 'static>(
f: F, f: F,
) -> TauriPlugin<R> { ) -> TauriPlugin<R> {
#[cfg(any(target_os = "windows", target_os = "linux"))]
platform_impl::init(Box::new(f)) platform_impl::init(Box::new(f))
} }

@ -1,10 +0,0 @@
#![cfg(target_os = "macos")]
use crate::SingleInstanceCallback;
use tauri::{
plugin::{self, TauriPlugin},
Runtime,
};
pub fn init<R: Runtime>(f: Box<SingleInstanceCallback<R>>) -> TauriPlugin<R> {
plugin::Builder::new("single-instance").build()
}
Loading…
Cancel
Save