Move shell scripts into sh/ subfolder

This commit is contained in:
Emil Ernerfeldt 2021-05-09 13:28:24 +02:00
parent 38186fe23e
commit 6ad6f56cb1
9 changed files with 34 additions and 4 deletions

View File

@ -29,6 +29,8 @@ First file an issue (or find an existing one) and announce that you plan to work
Browse through [`ARCHITECTURE.md`](https://github.com/emilk/egui/blob/master/ARCHITECTURE.md) to get a sense of how all pieces connects.
You can test your code locally by running `./sh/check.sh`.
When you have something that works, open a draft PR. You may get some helpful feedback early!
When you feel the PR is ready to go, do a self-review of the code, and then open it for review.

View File

@ -1,4 +0,0 @@
#!/bin/bash
set -eu
cargo run --bin egui_demo_app --release --all-features

View File

@ -1,5 +1,7 @@
#!/bin/bash
set -eu
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$script_path/.."
# Usage: build_demo_web.sh [--open]

View File

@ -1,4 +1,6 @@
#!/bin/bash
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$script_path/.."
set -eux
# Checks all tests, lints etc.
@ -24,3 +26,6 @@ cargo doc -p egui_web --target wasm32-unknown-unknown --lib --no-deps --all-feat
# what compiles slowly?
# cargo clean; cargo +nightly build -p egui -Z timings
# what compiles slowly?
# cargo llvm-lines --lib -p egui | head -20

9
sh/docs.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -eu
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$script_path/.."
cargo doc -p egui_web --target wasm32-unknown-unknown --lib --no-deps --all-features
cargo doc -p emath -p epaint -p egui -p eframe -p epi -p egui_web -p egui_glium --lib --no-deps --all-features --open
# cargo watch -c -x 'doc -p emath -p epaint -p egui --lib --no-deps --all-features'

6
sh/find_bloat.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
set -eu
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$script_path/.."
cargo bloat --release --bin egui_demo_app -n 200 | rg "egui "

View File

@ -1,5 +1,7 @@
#!/bin/bash
set -eu
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$script_path/.."
# Pre-requisites:
rustup target add wasm32-unknown-unknown

View File

@ -1,5 +1,7 @@
#!/bin/bash
set -eu
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$script_path/.."
# Starts a local web-server that serves the contents of the `doc/` folder,
# i.e. the web-version of `egui_demo_app`.

6
sh/wasm_size.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
set -eu
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$script_path"
./build_demo_web.sh && ls -l ../docs/*.wasm