Spelling fixes after https://github.com/emilk/eframe_template/pull/69
This commit is contained in:
parent
d12c19da37
commit
08b025b4e4
8
.github/workflows/pages.yml
vendored
8
.github/workflows/pages.yml
vendored
|
@ -1,12 +1,12 @@
|
||||||
name: Github Pages
|
name: Github Pages
|
||||||
|
|
||||||
# By default, runs if you push to master. keeps your deployed app in sync with master branch.
|
# By default, runs if you push to master. keeps your deployed app in sync with master branch.
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
# to only run when you do a new github release, comment out above part and uncomment the below trigger.
|
# to only run when you do a new github release, comment out above part and uncomment the below trigger.
|
||||||
# on:
|
# on:
|
||||||
# release:
|
# release:
|
||||||
# types:
|
# types:
|
||||||
# - published
|
# - published
|
||||||
|
@ -27,7 +27,7 @@ jobs:
|
||||||
override: true
|
override: true
|
||||||
- name: Rust Cache # cache the rust build artefacts
|
- name: Rust Cache # cache the rust build artefacts
|
||||||
uses: Swatinem/rust-cache@v1
|
uses: Swatinem/rust-cache@v1
|
||||||
- name: Downlaod and Install Trunk binary
|
- name: Download and install Trunk binary
|
||||||
run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
|
run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
|
||||||
- name: Build # build
|
- name: Build # build
|
||||||
# "${GITHUB_REPOSITORY#*/}" evaluates into the name of the repository
|
# "${GITHUB_REPOSITORY#*/}" evaluates into the name of the repository
|
||||||
|
@ -35,7 +35,7 @@ jobs:
|
||||||
# this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested
|
# this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested
|
||||||
# relatively as eframe_template/favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which
|
# relatively as eframe_template/favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which
|
||||||
# will obviously return error 404 not found.
|
# will obviously return error 404 not found.
|
||||||
run: ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}"
|
run: ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}"
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: JamesIves/github-pages-deploy-action@v4
|
uses: JamesIves/github-pages-deploy-action@v4
|
||||||
with:
|
with:
|
||||||
|
|
6
.github/workflows/rust.yml
vendored
6
.github/workflows/rust.yml
vendored
|
@ -99,7 +99,7 @@ jobs:
|
||||||
toolchain: 1.61.0
|
toolchain: 1.61.0
|
||||||
target: wasm32-unknown-unknown
|
target: wasm32-unknown-unknown
|
||||||
override: true
|
override: true
|
||||||
- name: Downlaod and Install Trunk binary
|
- name: Download and install Trunk binary
|
||||||
run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
|
run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
|
||||||
- name: Build
|
- name: Build
|
||||||
run: ./trunk build
|
run: ./trunk build
|
||||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,2 @@
|
||||||
/target
|
/target
|
||||||
/dist
|
/dist
|
||||||
|
|
14
README.md
14
README.md
|
@ -47,11 +47,11 @@ On Fedora Rawhide you need to run:
|
||||||
|
|
||||||
### Web Locally
|
### Web Locally
|
||||||
|
|
||||||
You can compile your app to [WASM](https://en.wikipedia.org/wiki/WebAssembly) and publish it as a web page.
|
You can compile your app to [WASM](https://en.wikipedia.org/wiki/WebAssembly) and publish it as a web page.
|
||||||
|
|
||||||
We use [Trunk](https://trunkrs.dev/) to build for web target.
|
We use [Trunk](https://trunkrs.dev/) to build for web target.
|
||||||
1. Install Trunk with `cargo install --locked trunk`.
|
1. Install Trunk with `cargo install --locked trunk`.
|
||||||
2. run `trunk serve` to build and serve on `http://127.0.0.1:8080`. will rebuild automatically if you edit the project.
|
2. run `trunk serve` to build and serve on `http://127.0.0.1:8080`. will rebuild automatically if you edit the project.
|
||||||
3. open `http://127.0.0.1:8080/index.html#dev` in a browser. see the warning below.
|
3. open `http://127.0.0.1:8080/index.html#dev` in a browser. see the warning below.
|
||||||
|
|
||||||
> `assets/sw.js` script will try to cache our app, and loads the cached version when it cannot connect to server allowing your app to work offline (like PWA).
|
> `assets/sw.js` script will try to cache our app, and loads the cached version when it cannot connect to server allowing your app to work offline (like PWA).
|
||||||
|
@ -61,10 +61,10 @@ We use [Trunk](https://trunkrs.dev/) to build for web target.
|
||||||
1. Just run `trunk build --release`.
|
1. Just run `trunk build --release`.
|
||||||
2. It will generate a `dist` directory as a "static html" website
|
2. It will generate a `dist` directory as a "static html" website
|
||||||
3. Upload the `dist` directory to any of the numerous free hosting websites including [GitHub Pages](https://docs.github.com/en/free-pro-team@latest/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site).
|
3. Upload the `dist` directory to any of the numerous free hosting websites including [GitHub Pages](https://docs.github.com/en/free-pro-team@latest/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site).
|
||||||
4. we already provide a workflow that auto-deploys our app to github pages if you enable it.
|
4. we already provide a workflow that auto-deploys our app to GitHub pages if you enable it.
|
||||||
> To enable Github Pages, you need to go to Respository -> Settings -> Pages -> Source -> set to `gh-pages` branch and `/` (root).
|
> To enable Github Pages, you need to go to Repository -> Settings -> Pages -> Source -> set to `gh-pages` branch and `/` (root).
|
||||||
>
|
>
|
||||||
> If `gh-pages` is not availabe in `Source`, just create and push a branch called `gh-pages` and it should be available.
|
> If `gh-pages` is not available in `Source`, just create and push a branch called `gh-pages` and it should be available.
|
||||||
|
|
||||||
You can test the template app at <https://emilk.github.io/eframe_template/>.
|
You can test the template app at <https://emilk.github.io/eframe_template/>.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "Egui Template PWA",
|
"name": "egui Template PWA",
|
||||||
"short_name": "egui-template-pwa",
|
"short_name": "egui-template-pwa",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
|
@ -25,4 +25,4 @@
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"background_color": "white",
|
"background_color": "white",
|
||||||
"theme_color": "white"
|
"theme_color": "white"
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,4 +22,4 @@ self.addEventListener('fetch', function (e) {
|
||||||
return response || fetch(e.request);
|
return response || fetch(e.request);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
1
check.sh
1
check.sh
|
@ -8,3 +8,4 @@ cargo fmt --all -- --check
|
||||||
cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::all
|
cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::all
|
||||||
cargo test --workspace --all-targets --all-features
|
cargo test --workspace --all-targets --all-features
|
||||||
cargo test --workspace --doc
|
cargo test --workspace --doc
|
||||||
|
trunk build
|
||||||
|
|
|
@ -112,6 +112,7 @@
|
||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -134,4 +135,4 @@
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
<!-- Powered by egui: https://github.com/emilk/egui/ -->
|
<!-- Powered by egui: https://github.com/emilk/egui/ -->
|
||||||
|
|
Loading…
Reference in a new issue