@@ -60,6 +60,7 @@ pub enum Template {
6060 PreactTs ,
6161 Blazor ,
6262 Dioxus ,
63+ Astro ,
6364}
6465
6566impl Display for Template {
@@ -83,6 +84,7 @@ impl Display for Template {
8384 Template :: PreactTs => write ! ( f, "preact-ts" ) ,
8485 Template :: Blazor => write ! ( f, "blazor" ) ,
8586 Template :: Dioxus => write ! ( f, "dioxus" ) ,
87+ Template :: Astro => write ! ( f, "astro" ) ,
8688 }
8789 }
8890}
@@ -109,6 +111,7 @@ impl FromStr for Template {
109111 "preact-ts" => Ok ( Template :: PreactTs ) ,
110112 "blazor" => Ok ( Template :: Blazor ) ,
111113 "dioxus" => Ok ( Template :: Dioxus ) ,
114+ "astro" => Ok ( Template :: Astro ) ,
112115 _ => Err ( format ! (
113116 "{YELLOW}{s}{RESET} is not a valid template. Valid templates are [{}]" ,
114117 Template :: ALL
@@ -138,6 +141,7 @@ impl Template {
138141 "Blazor - (https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor/)"
139142 }
140143 Template :: Dioxus => "Dioxus - (https://dioxuslabs.com/)" ,
144+ Template :: Astro => "Astro - (https://astro.build/)" ,
141145 _ => unreachable ! ( ) ,
142146 }
143147 }
@@ -163,6 +167,7 @@ impl<'a> Template {
163167 Template :: PreactTs ,
164168 Template :: Blazor ,
165169 Template :: Dioxus ,
170+ Template :: Astro ,
166171 ] ;
167172
168173 pub fn flavors < ' b > ( & self , pkg_manager : PackageManager ) -> Option < & ' b [ Flavor ] > {
@@ -227,7 +232,8 @@ impl<'a> Template {
227232 | Template :: SolidTs
228233 | Template :: Angular
229234 | Template :: Preact
230- | Template :: PreactTs => PackageManager :: NODE ,
235+ | Template :: PreactTs
236+ | Template :: Astro => PackageManager :: NODE ,
231237 Template :: Yew | Template :: Leptos | Template :: Sycamore | Template :: Dioxus => {
232238 & [ PackageManager :: Cargo ]
233239 }
0 commit comments