@@ -89,18 +89,28 @@ impl Options {
8989 self . app_name = self . app_name . map ( |s| Ok ( Some ( s) ) ) . unwrap_or_else ( || {
9090 prompts:: input (
9191 "What is your app name?" ,
92- init_defaults. app_name . clone ( ) ,
92+ Some (
93+ init_defaults
94+ . app_name
95+ . clone ( )
96+ . unwrap_or_else ( || "Tauri App" . to_string ( ) ) ,
97+ ) ,
9398 self . ci ,
94- false ,
99+ true ,
95100 )
96101 } ) ?;
97102
98103 self . window_title = self . window_title . map ( |s| Ok ( Some ( s) ) ) . unwrap_or_else ( || {
99104 prompts:: input (
100105 "What should the window title be?" ,
101- init_defaults. app_name . clone ( ) ,
106+ Some (
107+ init_defaults
108+ . app_name
109+ . clone ( )
110+ . unwrap_or_else ( || "Tauri" . to_string ( ) ) ,
111+ ) ,
102112 self . ci ,
103- false ,
113+ true ,
104114 )
105115 } ) ?;
106116
@@ -116,7 +126,7 @@ impl Options {
116126 "What is the url of your dev server?" ,
117127 init_defaults. framework . map ( |f| f. dev_url ( ) ) ,
118128 self . ci ,
119- false ,
129+ true ,
120130 )
121131 } ) ?;
122132
@@ -131,6 +141,7 @@ impl Options {
131141 true ,
132142 )
133143 } ) ?;
144+
134145 self . before_build_command = self
135146 . before_build_command
136147 . map ( |s| Ok ( Some ( s) ) )
@@ -186,35 +197,21 @@ pub fn command(mut options: Options) -> Result<()> {
186197 data. insert ( "tauri_build_dep" , to_json ( tauri_build_dep) ) ;
187198 data. insert (
188199 "frontend_dist" ,
189- to_json (
190- options
191- . frontend_dist
192- . unwrap_or_else ( || "../dist" . to_string ( ) ) ,
193- ) ,
194- ) ;
195- data. insert (
196- "dev_url" ,
197- to_json (
198- options
199- . dev_url
200- . unwrap_or_else ( || "http://localhost:4000" . to_string ( ) ) ,
201- ) ,
200+ to_json ( options. frontend_dist . as_deref ( ) . unwrap_or ( "../dist" ) ) ,
202201 ) ;
202+ data. insert ( "dev_url" , to_json ( options. dev_url ) ) ;
203203 data. insert (
204204 "app_name" ,
205- to_json ( options. app_name . unwrap_or_else ( || "Tauri App" . to_string ( ) ) ) ,
205+ to_json ( options. app_name . as_deref ( ) . unwrap_or ( "Tauri App" ) ) ,
206206 ) ;
207207 data. insert (
208208 "window_title" ,
209- to_json ( options. window_title . unwrap_or_else ( || "Tauri" . to_string ( ) ) ) ,
210- ) ;
211- data. insert (
212- "before_dev_command" ,
213- to_json ( options. before_dev_command . unwrap_or_default ( ) ) ,
209+ to_json ( options. window_title . as_deref ( ) . unwrap_or ( "Tauri" ) ) ,
214210 ) ;
211+ data. insert ( "before_dev_command" , to_json ( options. before_dev_command ) ) ;
215212 data. insert (
216213 "before_build_command" ,
217- to_json ( options. before_build_command . unwrap_or_default ( ) ) ,
214+ to_json ( options. before_build_command ) ,
218215 ) ;
219216
220217 let mut config = serde_json:: from_str (
0 commit comments