Better build support

This commit is contained in:
Jeremy Wall 2022-02-19 16:33:06 -05:00
parent 4bfd04b048
commit a2542c6290
2 changed files with 3 additions and 4 deletions

View File

@ -19,11 +19,10 @@ release: wasmrelease
cd kitchen; cargo build --release
wasmrelease: web/index.html web/src/*.rs web/src/components/*.rs
cd web; trunk build --release --public-url /ui/ --dist ../kitchen/webdist
cd web; trunk build --release --public-url /ui/
wasm: web/index.html web/src/*.rs web/src/components/*.rs
cd web; trunk build --public-url /ui/
cp -r web/dist kitchen/webdist
clean:
rm -rf web/dist/* kitchen/webdist
rm -rf web/dist/*

View File

@ -36,7 +36,7 @@ pub async fn get_recipes(recipe_dir_path: PathBuf) -> Result<Vec<String>, ParseE
pub async fn ui_main(recipe_dir_path: PathBuf) {
let root = warp::path::end().map(|| warp::redirect::found(Uri::from_static("/ui")));
let ui = warp::path("ui").and(static_dir!("webdist/"));
let ui = warp::path("ui").and(static_dir!("../web/dist"));
let api = warp::path("api")
.and(warp::path("v1"))
.and(warp::path("recipes"))