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}