Fix run.sh for not using trunk

This commit is contained in:
Jeremy Wall 2022-06-15 20:51:50 -04:00
parent f6a25043dc
commit ab019ea072
2 changed files with 7 additions and 12 deletions

View File

@ -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:

11
run.sh
View File

@ -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}