-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update to tauri v2-beta (#589)
* feat: Update to tauri v2-beta * changefile * make --alpha alias for --beta * wording * Update tauri-beta-0.md
- Loading branch information
1 parent
1b1834c
commit 4dbdcc9
Showing
19 changed files
with
74 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"create-tauri-app": minor | ||
"create-tauri-app-js": minor | ||
--- | ||
|
||
Updated the templates to Tauri v2 beta. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,8 +54,8 @@ pub fn parse(argv: Vec<OsString>, bin_name: Option<String>) -> anyhow::Result<Ar | |
{GREEN}-t{RESET}, {GREEN}--template <TEMPLATE>{RESET} Specify the UI template to use [{templates}] | ||
{GREEN}-y{RESET}, {GREEN}--yes{RESET} Skip prompts and use defaults where applicable | ||
{GREEN}-f{RESET}, {GREEN}--force{RESET} Force create the directory even if it is not empty. | ||
{GREEN}--alpha{RESET} Bootstraps a project using [email protected] | ||
{GREEN}--mobile{RESET} Bootstraps a mobile project too. Only availabe with `--alpha` option. | ||
{GREEN}--beta{RESET} Bootstraps a project using [email protected] | ||
{GREEN}--mobile{RESET} Bootstraps a mobile project too. Only availabe with `--beta` option. | ||
{GREEN}-h{RESET}, {GREEN}--help{RESET} Prints help information | ||
{GREEN}-v{RESET}, {GREEN}--version{RESET} Prints version information | ||
"#, | ||
|
@@ -82,13 +82,18 @@ pub fn parse(argv: Vec<OsString>, bin_name: Option<String>) -> anyhow::Result<Ar | |
println!("{}", env!("CARGO_PKG_VERSION")); | ||
std::process::exit(0); | ||
} | ||
if pargs.contains("--alpha") { | ||
eprintln!( | ||
"{BOLD}{YELLOW}warning{RESET}: The `{GREEN}--alpha{RESET}` option is now an alias for `{GREEN}--beta{RESET}` and may be removed in the future." | ||
); | ||
} | ||
|
||
let args = Args { | ||
manager: pargs.opt_value_from_str(["-m", "--manager"])?, | ||
template: pargs.opt_value_from_str(["-t", "--template"])?, | ||
skip: pargs.contains(["-y", "--yes"]), | ||
force: pargs.contains(["-f", "--force"]), | ||
alpha: pargs.contains("--alpha"), | ||
alpha: pargs.contains("--alpha") || pargs.contains("--beta"), | ||
mobile: if pargs.contains("--mobile") { | ||
Some(true) | ||
} else { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": "./schemas/desktop-schema.json", | ||
"identifier": "main-capability", | ||
"description": "Capability for the main window", | ||
"windows": ["main"], | ||
"permissions": [ | ||
"path:default", | ||
"event:default", | ||
"window:default", | ||
"app:default", | ||
"resources:default", | ||
"menu:default", | ||
"tray:default", | ||
"shell:open" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters