mirror of
https://github.com/zaphar/kitchen.git
synced 2025-07-22 19:40:14 -04:00
Better build support
This commit is contained in:
parent
4bfd04b048
commit
a2542c6290
5
Makefile
5
Makefile
@ -19,11 +19,10 @@ release: wasmrelease
|
|||||||
cd kitchen; cargo build --release
|
cd kitchen; cargo build --release
|
||||||
|
|
||||||
wasmrelease: web/index.html web/src/*.rs web/src/components/*.rs
|
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
|
wasm: web/index.html web/src/*.rs web/src/components/*.rs
|
||||||
cd web; trunk build --public-url /ui/
|
cd web; trunk build --public-url /ui/
|
||||||
cp -r web/dist kitchen/webdist
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf web/dist/* kitchen/webdist
|
rm -rf web/dist/*
|
@ -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) {
|
pub async fn ui_main(recipe_dir_path: PathBuf) {
|
||||||
let root = warp::path::end().map(|| warp::redirect::found(Uri::from_static("/ui")));
|
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")
|
let api = warp::path("api")
|
||||||
.and(warp::path("v1"))
|
.and(warp::path("v1"))
|
||||||
.and(warp::path("recipes"))
|
.and(warp::path("recipes"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user