mirror of
https://github.com/zaphar/kitchen.git
synced 2025-07-21 19:29:49 -04:00
Better build and run scripts
This commit is contained in:
parent
2282192678
commit
9c5d127b4e
10
Makefile
10
Makefile
@ -13,11 +13,17 @@
|
||||
# limitations under the License.
|
||||
|
||||
kitchen: wasm kitchen/src/*.rs
|
||||
cp -r web/dist kitchen/webdist
|
||||
cd kitchen; cargo build
|
||||
|
||||
wasm: web/index.html web/src/*.rs
|
||||
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
|
||||
|
||||
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
|
6
run.sh
6
run.sh
@ -11,7 +11,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
EXAMPLES=${EXAMPLES:-../examples}
|
||||
make clean kitchen
|
||||
pushd web
|
||||
trunk serve \
|
||||
@ -21,7 +21,7 @@ trunkpid=$!
|
||||
popd
|
||||
trap "{ echo killing ${trunkpid}; kill -9 ${trunkpid}; }" EXIT
|
||||
pushd kitchen
|
||||
echo Starting api server
|
||||
cargo run -- serve --dir ../examples
|
||||
echo Starting api server serving ${EXAMPLES}
|
||||
cargo run -- serve --dir ${EXAMPLES}
|
||||
popd
|
||||
# This is ghetto but I'm doing it anyway
|
Loading…
x
Reference in New Issue
Block a user