mirror of
https://github.com/tauri-apps/tauri.git
synced 2025-01-01 15:36:14 +03:00
chore(cli.rs): some plugin template fixes
This commit is contained in:
parent
3450902862
commit
a0bea432b4
@ -101,8 +101,14 @@ impl Init {
|
||||
)
|
||||
} else {
|
||||
(
|
||||
format!(r#"{{ version = "{}" }}"#, metadata.tauri),
|
||||
format!(r#"{{ version = "{}" }}"#, metadata.tauri_build),
|
||||
format!(
|
||||
r#"{{ version = "{}", features = [ "api-all" ] }}"#,
|
||||
metadata.tauri
|
||||
),
|
||||
format!(
|
||||
r#"{{ version = "{}", features = [ "api-all" ] }}"#,
|
||||
metadata.tauri_build
|
||||
),
|
||||
)
|
||||
};
|
||||
|
||||
|
@ -85,8 +85,14 @@ impl Plugin {
|
||||
)
|
||||
} else {
|
||||
(
|
||||
format!(r#"{{ version = "{}" }}"#, metadata.tauri),
|
||||
format!(r#"{{ version = "{}" }}"#, metadata.tauri_build),
|
||||
format!(
|
||||
r#"{{ version = "{}", features = [ "api-all" ] }}"#,
|
||||
metadata.tauri
|
||||
),
|
||||
format!(
|
||||
r#"{{ version = "{}", features = [ "api-all" ] }}"#,
|
||||
metadata.tauri_build
|
||||
),
|
||||
)
|
||||
};
|
||||
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-plugin-{{ plugin_name }}": "minor"
|
||||
---
|
||||
|
||||
Initial release.
|
@ -1,9 +1,10 @@
|
||||
[package]
|
||||
name = "tauri-plugin-{{ plugin_name }}"
|
||||
version = "0.1.0"
|
||||
version = "0.0.0"
|
||||
authors = [ "You" ]
|
||||
description = ""
|
||||
edition = "2018"
|
||||
exclude = ["/examples"]
|
||||
|
||||
[dependencies]
|
||||
tauri = {{{ tauri_dep }}}
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-plugin-{{ plugin_name }}": "minor"
|
||||
---
|
||||
|
||||
Initial release.
|
@ -3,7 +3,6 @@
|
||||
windows_subsystem = "windows"
|
||||
)]
|
||||
|
||||
|
||||
fn main() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_{{ plugin_name_snake_case }}::YourPlugin::default())
|
||||
|
@ -4,7 +4,7 @@
|
||||
let response = ''
|
||||
|
||||
function updateResponse(returnValue) {
|
||||
response += (typeof returnValue === 'string' ? returnValue : JSON.stringify(returnValue)) + '<br>'
|
||||
response += `[${new Date().toLocaleTimeString()}]` + (typeof returnValue === 'string' ? returnValue : JSON.stringify(returnValue)) + '<br>'
|
||||
}
|
||||
|
||||
function _execute() {
|
||||
@ -14,4 +14,5 @@
|
||||
|
||||
<div>
|
||||
<button on:click="{_execute}">Execute</button>
|
||||
<div>{@html response}</div>
|
||||
</div>
|
||||
|
@ -17,9 +17,7 @@ impl Serialize for Error {
|
||||
where
|
||||
S: Serializer,
|
||||
{
|
||||
match self {
|
||||
Self::Io(error) => serializer.serialize_str(error.to_string().as_ref()),
|
||||
}
|
||||
serializer.serialize_str(self.to_string().as_ref())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user