Skip to content

Commit 97c01a3

Browse files
fix: use src directory for example app builds (#62)
The xtask build_examples step expected a 'templates/' subdirectory in each example app, but both hello-world and todo-fast store their HTML sources in 'src/'. Update run_app_builds() to look for 'src/' instead of 'templates/'.
1 parent 2f2532d commit 97c01a3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

xtask/src/build_examples.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,20 @@ pub fn run_app_builds() -> Result<(), String> {
7878

7979
for app_dir in app_dirs {
8080
let app_name = display_name(&app_dir);
81-
let templates_dir = app_dir.join("templates");
82-
if !templates_dir.is_dir() {
81+
let src_dir = app_dir.join("src");
82+
if !src_dir.is_dir() {
8383
return Err(format!(
84-
"app '{}' is missing templates directory at {}",
84+
"app '{}' is missing src directory at {}",
8585
app_name,
86-
templates_dir.display()
86+
src_dir.display()
8787
));
8888
}
8989

9090
let output_dir = app_dir.join("dist");
9191

9292
eprintln!(" • app: {}", app_name);
9393

94-
let templates_str = templates_dir.to_string_lossy().to_string();
94+
let src_str = src_dir.to_string_lossy().to_string();
9595
let output_str = output_dir.to_string_lossy().to_string();
9696

9797
// Apps ending in "-fast" use the FAST parser plugin
@@ -101,7 +101,7 @@ pub fn run_app_builds() -> Result<(), String> {
101101
"webui-cli",
102102
"--",
103103
"build",
104-
&templates_str,
104+
&src_str,
105105
"--out",
106106
&output_str,
107107
];

0 commit comments

Comments
 (0)