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