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
* feat(cli): allow merging multiple configuration values
Currently the dev/build/bundle commands can only merge a single Tauri configuration value (file or raw JSON string), which imposes a limitation in scenarios where you need more flexibility (like multiple app flavors and environments). This changes the config CLI option to allow multiple values, letting you merge multiple Tauri config files with the main one.
* fix ios build
Copy file name to clipboardExpand all lines: crates/tauri-cli/src/build.rs
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -47,9 +47,15 @@ pub struct Options {
47
47
/// Skip the bundling step even if `bundle > active` is `true` in tauri config.
48
48
#[clap(long)]
49
49
pubno_bundle:bool,
50
-
/// JSON string or path to JSON file to merge with tauri.conf.json
50
+
/// JSON strings or path to JSON files to merge with the default configuration file
51
+
///
52
+
/// Configurations are merged in the order they are provided, which means a particular value overwrites previous values when a config key-value pair conflicts.
53
+
///
54
+
/// Note that a platform-specific file is looked up and merged with the default file by default
55
+
/// (tauri.macos.conf.json, tauri.linux.conf.json, tauri.windows.conf.json, tauri.android.conf.json and tauri.ios.conf.json)
56
+
/// but you can use this for more specific use cases such as different build flavors.
51
57
#[clap(short, long)]
52
-
pubconfig:Option<ConfigValue>,
58
+
pubconfig:Vec<ConfigValue>,
53
59
/// Command line arguments passed to the runner. Use `--` to explicitly mark the start of the arguments.
/// JSON string or path to JSON file to merge with tauri.conf.json
70
+
/// JSON strings or path to JSON files to merge with the default configuration file
71
+
///
72
+
/// Configurations are merged in the order they are provided, which means a particular value overwrites previous values when a config key-value pair conflicts.
73
+
///
74
+
/// Note that a platform-specific file is looked up and merged with the default file by default
75
+
/// (tauri.macos.conf.json, tauri.linux.conf.json, tauri.windows.conf.json, tauri.android.conf.json and tauri.ios.conf.json)
76
+
/// but you can use this for more specific use cases such as different build flavors.
71
77
#[clap(short, long)]
72
-
pubconfig:Option<ConfigValue>,
78
+
pubconfig:Vec<ConfigValue>,
73
79
/// Space or comma separated list of features, should be the same features passed to `tauri build` if any.
Copy file name to clipboardExpand all lines: crates/tauri-cli/src/dev.rs
+17-21Lines changed: 17 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -59,9 +59,15 @@ pub struct Options {
59
59
/// Exit on panic
60
60
#[clap(short, long)]
61
61
pubexit_on_panic:bool,
62
-
/// JSON string or path to JSON file to merge with tauri.conf.json
62
+
/// JSON strings or path to JSON files to merge with the default configuration file
63
+
///
64
+
/// Configurations are merged in the order they are provided, which means a particular value overwrites previous values when a config key-value pair conflicts.
65
+
///
66
+
/// Note that a platform-specific file is looked up and merged with the default file by default
67
+
/// (tauri.macos.conf.json, tauri.linux.conf.json, tauri.windows.conf.json, tauri.android.conf.json and tauri.ios.conf.json)
68
+
/// but you can use this for more specific use cases such as different build flavors.
/// JSON string or path to JSON file to merge with tauri.conf.json
52
+
/// JSON strings or path to JSON files to merge with the default configuration file
53
+
///
54
+
/// Configurations are merged in the order they are provided, which means a particular value overwrites previous values when a config key-value pair conflicts.
55
+
///
56
+
/// Note that a platform-specific file is looked up and merged with the default file by default
57
+
/// (tauri.macos.conf.json, tauri.linux.conf.json, tauri.windows.conf.json, tauri.android.conf.json and tauri.ios.conf.json)
58
+
/// but you can use this for more specific use cases such as different build flavors.
0 commit comments