From 08b025b4e4f79b1bbaa7af23727961d0bf9a0be8 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 19 Aug 2022 17:41:46 +0200 Subject: [PATCH] Spelling fixes after https://github.com/emilk/eframe_template/pull/69 --- .github/workflows/pages.yml | 8 ++++---- .github/workflows/rust.yml | 6 +++--- .gitignore | 2 +- README.md | 14 +++++++------- assets/manifest.json | 4 ++-- assets/sw.js | 2 +- check.sh | 1 + index.html | 3 ++- 8 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 5edb4ee..36d1f89 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,12 +1,12 @@ 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: push: branches: - master # to only run when you do a new github release, comment out above part and uncomment the below trigger. -# on: +# on: # release: # types: # - published @@ -27,7 +27,7 @@ jobs: override: true - name: Rust Cache # cache the rust build artefacts 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- - name: Build # build # "${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 # 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. - run: ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}" + run: ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}" - name: Deploy uses: JamesIves/github-pages-deploy-action@v4 with: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 16547fa..ed3317e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -99,7 +99,7 @@ jobs: toolchain: 1.61.0 target: wasm32-unknown-unknown 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- - - name: Build - run: ./trunk build + - name: Build + run: ./trunk build diff --git a/.gitignore b/.gitignore index a803f50..4f96631 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ /target -/dist \ No newline at end of file +/dist diff --git a/README.md b/README.md index 2ec80cf..6b4c398 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,11 @@ On Fedora Rawhide you need to run: ### 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. -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. +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. 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). @@ -61,10 +61,10 @@ We use [Trunk](https://trunkrs.dev/) to build for web target. 1. Just run `trunk build --release`. 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). -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). -> -> If `gh-pages` is not availabe in `Source`, just create and push a branch called `gh-pages` and it should be available. +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 Repository -> Settings -> Pages -> Source -> set to `gh-pages` branch and `/` (root). +> +> 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 . diff --git a/assets/manifest.json b/assets/manifest.json index 586cf91..2a137fb 100644 --- a/assets/manifest.json +++ b/assets/manifest.json @@ -1,5 +1,5 @@ { - "name": "Egui Template PWA", + "name": "egui Template PWA", "short_name": "egui-template-pwa", "icons": [ { @@ -25,4 +25,4 @@ "display": "standalone", "background_color": "white", "theme_color": "white" -} \ No newline at end of file +} diff --git a/assets/sw.js b/assets/sw.js index b2395f6..7ecd229 100644 --- a/assets/sw.js +++ b/assets/sw.js @@ -22,4 +22,4 @@ self.addEventListener('fetch', function (e) { return response || fetch(e.request); }) ); -}); \ No newline at end of file +}); diff --git a/check.sh b/check.sh index 23a4930..bb7b4e4 100755 --- a/check.sh +++ b/check.sh @@ -8,3 +8,4 @@ cargo fmt --all -- --check cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::all cargo test --workspace --all-targets --all-features cargo test --workspace --doc +trunk build diff --git a/index.html b/index.html index 94b6ba8..02d2c37 100644 --- a/index.html +++ b/index.html @@ -112,6 +112,7 @@ transform: rotate(360deg); } } + @@ -134,4 +135,4 @@ - \ No newline at end of file +