From ab019ea072a7a20c53b4d73420a74c9649943eaa Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Wed, 15 Jun 2022 20:51:50 -0400 Subject: [PATCH] Fix run.sh for not using trunk --- Makefile | 8 ++++++-- run.sh | 11 +---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 7cda5e4..3f7c641 100644 --- a/Makefile +++ b/Makefile @@ -23,10 +23,14 @@ static-prep: web/index.html web/static/*.css cp -r web/index.html web/dist/ cp -r web/static web/dist/ -wasmrelease: static-prep web/src/*.rs web/src/components/*.rs +wasmrelease: wasmrelease-dist static-prep + +wasmrelease-dist: web/src/*.rs web/src/components/*.rs cd web; wasm-pack build --release --target web --out-dir dist/ -wasm: static-prep web/src/*.rs web/src/components/*.rs +wasm: wasm-dist static-prep + +wasm-dist: web/src/*.rs web/src/components/*.rs cd web; wasm-pack build --target web --out-dir dist/ clean: diff --git a/run.sh b/run.sh index 84f14e8..b1f98fb 100755 --- a/run.sh +++ b/run.sh @@ -12,16 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. EXAMPLES=${EXAMPLES:-../examples} -make clean kitchen -pushd web -trunk serve \ - --public-url /ui \ - --watch . \ - --watch ../recipes \ - --proxy-backend http://localhost:3030/api/v1 & -trunkpid=$! -popd -trap "{ echo killing ${trunkpid}; kill -9 ${trunkpid}; }" EXIT +make clean wasm kitchen pushd kitchen echo Starting api server serving ${EXAMPLES} cargo run -- serve --dir ${EXAMPLES}