You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"{BOLD}{RED}error{RESET}: the {GREEN}{template}{RESET} template is not suppported for the {GREEN}{pkg_manager}{RESET} package manager\n possible templates for {GREEN}{pkg_manager}{RESET} are: [{}]",
"{BOLD}{RED}error{RESET}: the {GREEN}{}{RESET} template is not suppported for the {GREEN}{pkg_manager}{RESET} package manager\n possible templates for {GREEN}{pkg_manager}{RESET} are: [{}]",
println!("{ITALIC}{DIM}Please follow{DIMRESET} {BLUE}https://tauri.app/v1/guides/getting-started/prerequisites{WHITE} {DIM}to install the needed prerequisites, if you haven't already.{DIMRESET}{RESET}");
167
+
println!(
168
+
"{ITALIC}{DIM}Please follow{DIMRESET} {BLUE}https://tauri.app/v1/guides/getting-started/prerequisites{WHITE} {DIM}to install the needed prerequisites, if you haven't already.{DIMRESET}{RESET}",
Copy file name to clipboardExpand all lines: packages/cli/src/template.rs
+21-5Lines changed: 21 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,9 @@ use crate::{colors::*, package_manager::PackageManager};
13
13
#[folder = "$CARGO_MANIFEST_DIR/fragments"]
14
14
structFragments;
15
15
16
-
#[derive(Debug,Clone,Copy,Default,PartialEq,Eq)]
16
+
#[derive(Debug,Clone,Copy,PartialEq,Eq)]
17
17
#[non_exhaustive]
18
18
pubenumTemplate{
19
-
#[default]
20
19
Vanilla,
21
20
VanillaTs,
22
21
Vue,
@@ -34,6 +33,12 @@ pub enum Template {
34
33
PreactTs,
35
34
}
36
35
36
+
implDefaultforTemplate{
37
+
fndefault() -> Self{
38
+
Template::Vanilla
39
+
}
40
+
}
41
+
37
42
impl<'a>Template{
38
43
pubconstALL:&'a[Template] = &[
39
44
Template::Vanilla,
@@ -55,7 +60,18 @@ impl<'a> Template {
55
60
56
61
pubfnpost_init_info(&self) -> Option<String>{
57
62
matchself{
58
-
Template::Yew => Some(format!("{ITALIC}{DIM}You also need to install{DIMRESET} {YELLOW}tauri-cli{WHITE} {DIM}({DIMRESET}{BLUE}cargo install tauri-cli{WHITE}{DIM}) and{DIMRESET} {YELLOW}trunk{WHITE} {DIM}({DIMRESET}{BLUE}https://trunkrs.dev/#install{WHITE}{DIM}){DIMRESET}{RESET}")),
63
+
Template::Yew => Some(
64
+
format!(
65
+
"{ITALIC}{DIM}You also need to install{DIMRESET} {YELLOW}tauri-cli{WHITE} {DIM}({DIMRESET}{BLUE}cargo install tauri-cli{WHITE}{DIM}) and{DIMRESET} {YELLOW}trunk{WHITE} {DIM}({DIMRESET}{BLUE}https://trunkrs.dev/#install{WHITE}{DIM}){DIMRESET}{RESET}",
0 commit comments