From a6c5b54fa02aa3cf77e1996bdf87e5d499f7d2f1 Mon Sep 17 00:00:00 2001 From: Jens Reimann Date: Wed, 6 Dec 2023 08:40:50 +0100 Subject: [PATCH] chore: revert from trunk-ng to trunk --- .github/workflows/ci.yaml | 14 ++++----- .github/workflows/pages.yaml | 12 ++++---- .github/workflows/release.yaml | 53 +++++++++++++++++----------------- CNAME | 1 + CONTRIBUTING.md | 7 ++--- Cargo.lock | 2 +- Cargo.toml | 4 +-- README.md | 36 ++++++++++------------- examples/yew-tls/README.md | 2 +- site/config.toml | 8 ++--- site/content/_index.md | 24 +++++++-------- site/templates/index.html | 12 ++++---- 12 files changed, 84 insertions(+), 91 deletions(-) create mode 100644 CNAME diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f148129f..3220d1ff 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,18 +3,16 @@ on: push: branches: - master - - trunk-ng pull_request: branches: - master - - trunk-ng jobs: lint: name: lint runs-on: ubuntu-latest steps: - name: Setup | Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions/cache@v3 with: @@ -42,7 +40,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup | Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup | Cache Cargo uses: actions/cache@v3 @@ -71,15 +69,15 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] include: - os: ubuntu-latest - binPath: target/debug/trunk-ng + binPath: target/debug/trunk - os: macos-latest - binPath: target/debug/trunk-ng + binPath: target/debug/trunk - os: windows-latest - binPath: target/debug/trunk-ng.exe + binPath: target/debug/trunk.exe runs-on: ${{ matrix.os }} steps: - name: Setup | Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup | Cache Cargo uses: actions/cache@v3 diff --git a/.github/workflows/pages.yaml b/.github/workflows/pages.yaml index 1f20b499..db928693 100644 --- a/.github/workflows/pages.yaml +++ b/.github/workflows/pages.yaml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup | Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Setup | Zola @@ -24,9 +24,9 @@ jobs: && sudo chmod a+x zola && sudo mv zola /bin/zola - name: Build run: cd site && zola build - - name: Upload - uses: actions/upload-pages-artifact@v2 - with: - path: ./site/public - name: Deploy - uses: actions/deploy-pages@v2 \ No newline at end of file + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./site/public + cname: trunkrs.dev \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0c3467be..4acbce1f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -44,21 +44,21 @@ jobs: include: - target: x86_64-unknown-linux-gnu os: ubuntu-22.04 - name: trunk-ng-x86_64-unknown-linux-gnu.tar.gz + name: trunk-x86_64-unknown-linux-gnu.tar.gz - target: aarch64-unknown-linux-gnu os: ubuntu-22.04 - name: trunk-ng-aarch64-unknown-linux-gnu.tar.gz + name: trunk-aarch64-unknown-linux-gnu.tar.gz cross: "true" - target: x86_64-apple-darwin os: macos-12 - name: trunk-ng-x86_64-apple-darwin.tar.gz + name: trunk-x86_64-apple-darwin.tar.gz - target: aarch64-apple-darwin os: macos-12 xcode: "true" - name: trunk-ng-aarch64-apple-darwin.tar.gz + name: trunk-aarch64-apple-darwin.tar.gz - target: x86_64-pc-windows-msvc os: windows-2022 - name: trunk-ng-x86_64-pc-windows-msvc.zip + name: trunk-x86_64-pc-windows-msvc.zip ext: ".exe" runs-on: ${{ matrix.os }} @@ -121,10 +121,10 @@ jobs: mkdir -p upload # if we have an alternate target, there is a sub-directory - if [[ -f "target/release/trunk-ng${{ matrix.ext }}" ]]; then - SRC="target/release/trunk-ng${{ matrix.ext }}" - elif [[ -f "target/${{ matrix.target }}/release/trunk-ng${{ matrix.ext }}" ]]; then - SRC="target/${{ matrix.target }}/release/trunk-ng${{ matrix.ext }}" + if [[ -f "target/release/trunk${{ matrix.ext }}" ]]; then + SRC="target/release/trunk${{ matrix.ext }}" + elif [[ -f "target/${{ matrix.target }}/release/trunk${{ matrix.ext }}" ]]; then + SRC="target/${{ matrix.target }}/release/trunk${{ matrix.ext }}" else echo "Unable to find output" find target @@ -132,27 +132,27 @@ jobs: fi # for upload - cp -pv "${SRC}" upload/trunk-ng${{ matrix.ext }} + cp -pv "${SRC}" upload/trunk${{ matrix.ext }} - name: Post Build | Strip binary if: matrix.cross != 'true' working-directory: upload run: | - ls -l trunk-ng${{matrix.ext}} - strip trunk-ng${{matrix.ext}} - ls -l trunk-ng${{matrix.ext}} + ls -l trunk${{matrix.ext}} + strip trunk${{matrix.ext}} + ls -l trunk${{matrix.ext}} - name: Post Build | Prepare artifacts [Windows] if: matrix.os == 'windows-latest' working-directory: upload run: | - 7z a ${{ matrix.name }} trunk-ng${{matrix.ext}} + 7z a ${{ matrix.name }} trunk${{matrix.ext}} - name: Post Build | Prepare artifacts [-nix] if: matrix.os != 'windows-latest' working-directory: upload run: | - tar czvf ${{ matrix.name }} trunk-ng${{matrix.ext}} + tar czvf ${{ matrix.name }} trunk${{matrix.ext}} - name: Post Build | Upload artifacts uses: actions/upload-artifact@v3 @@ -174,7 +174,7 @@ jobs: uses: actions/download-artifact@v3 - name: Setup | Checksums - run: for file in trunk-ng-*/trunk-ng-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done + run: for file in trunk-*/trunk-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done - name: Setup | Install convco run: | @@ -197,7 +197,7 @@ jobs: OPTS="${OPTS} -p" fi gh release create ${OPTS} --title "${{ needs.init.outputs.version }}" -F RELEASE_LOG.md ${TAG} \ - trunk-ng-*/trunk-ng-* + trunk-*/trunk-* pages: needs: release @@ -214,12 +214,13 @@ jobs: run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }} -# brew: -# needs: release -# runs-on: ubuntu-latest -# steps: -# - uses: mislav/bump-homebrew-formula-action@v2 -# with: -# formula-name: trunk -# env: -# COMMITTER_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }} + brew: + needs: release + runs-on: ubuntu-latest + steps: + - uses: mislav/bump-homebrew-formula-action@v2 + with: + formula-name: trunk + formula-path: Formula/t/trunk.rb + env: + COMMITTER_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }} diff --git a/CNAME b/CNAME new file mode 100644 index 00000000..6f5faddd --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +trunkrs.dev \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e263cc78..1569f2b6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,8 +5,7 @@ We are all living beings, and what is most important is that we respect each oth ## hacking Just a few simple items to keep in mind as you hack. -- Pull request early and often. This helps to let others know what you are working on. **Please use Github's Draft PR mechanism** if your PR is not yet ready for review. -- ~~Remember to update the `CHANGELOG.md` once you believe your work is nearing completion.~~ +- Pull request early and often. This helps to let others know what you are working on. **Please use GitHub's Draft PR mechanism** if your PR is not yet ready for review. - Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/), a changelog will automatically be created from such commits ## linting @@ -21,5 +20,5 @@ We follow [semver](https://semver.org/spec/v2.0.0.html) for versioning this syst - [ ] ensure CI completes successfully. - [ ] add a new tag to the repo matching the new `Cargo.toml` `version`. Either via `git tag` or via the Github UI. - all release tags should start with the letter `v` followed by a semver version. -- [ ] CI is configured for release tags and will create a new Github release, and will upload release artifacts to the release page. Verify that this process has completed successfully. -- [ ] ~~update the new release page with details on the changes made, which should reflect the content of the `CHANGELOG.md`.~~ +- [ ] CI is configured for release tags and will create a new GitHub release, and will upload release artifacts to the release page. Verify that this process has completed successfully. + diff --git a/Cargo.lock b/Cargo.lock index 8b2d048b..055ebe37 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3196,7 +3196,7 @@ dependencies = [ ] [[package]] -name = "trunk-ng" +name = "trunk" version = "0.17.16" dependencies = [ "ansi_term", diff --git a/Cargo.toml b/Cargo.toml index 68c22b77..e8cb5f02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "trunk-ng" +name = "trunk" version = "0.17.16" edition = "2021" description = "Build, bundle & ship your Rust WASM application to the web." @@ -8,7 +8,7 @@ authors = [ "Anthony Dodd ", "Jens Reimann " ] -repository = "https://github.com/ctron/trunk" +repository = "https://github.com/thedodd/trunk" readme = "README.md" categories = ["command-line-utilities", "wasm", "web-programming"] keywords = ["wasm", "bundler", "web", "build-tool", "compiler"] diff --git a/README.md b/README.md index f64f6440..b552e81c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# Trunk NG +# Trunk -[![Build Status](https://github.com/ctron/trunk/actions/workflows/ci.yaml/badge.svg?branch=trunk-ng)](https://github.com/ctron/trunk/actions) -[![](https://img.shields.io/crates/v/trunk-ng.svg?color=brightgreen&style=flat-square)](https://crates.io/crates/trunk-ng) +[![Build Status](https://github.com/thedodd/trunk/actions/workflows/ci.yaml/badge.svg?branch=trunk)](https://github.com/thedodd/trunk/actions) +[![](https://img.shields.io/crates/v/trunk.svg?color=brightgreen&style=flat-square)](https://crates.io/crates/trunk) ![](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue?style=flat-square) [![Discord Chat](https://img.shields.io/discord/793890238267260958?logo=discord&style=flat-square)](https://discord.gg/JEPdBujTDr) -[![](https://img.shields.io/crates/d/trunk-ng?label=downloads%20%28crates.io%29&style=flat-square)](https://crates.io/crates/trunk-ng) -[![](https://img.shields.io/github/downloads/ctron/trunk/total?label=downloads%20%28GH%29&style=flat-square)](https://github.com/ctron/trunk/releases) +[![](https://img.shields.io/crates/d/trunk?label=downloads%20%28crates.io%29&style=flat-square)](https://crates.io/crates/trunk) +[![](https://img.shields.io/github/downloads/thedodd/trunk/total?label=downloads%20%28GH%29&style=flat-square)](https://github.com/thedodd/trunk/releases) **Build, bundle & ship your Rust WASM application to the web.**
@@ -13,27 +13,23 @@ Trunk is a WASM web application bundler for Rust. Trunk uses a simple, optional-config pattern for building & bundling WASM, JS snippets & other assets (images, css, scss) via a source HTML file. -> [!NOTE] -> This is a forked version of `trunk`, adding features and bug fixes which didn't get merged into trunk so far. -Replace `trunk` with `trunk-ng` for all operations. - **📦 Dev server** - Trunk ships with a built-in server for rapid development workflows, as well as support for HTTP & WebSocket proxies. **🏗 Change detection** - Trunk watches your application for changes and triggers builds for you, including automatic browser reloading. ## Getting Started -Head on over to the [Trunk-ng website](https://ctron.github.io/trunk/), everything you need is there. A few quick links: +Head on over to the [Trunk website](https://trunkrs.dev), everything you need is there. A few quick links: -- [Install](https://ctron.github.io/trunk/#install) - - Download a released binary: https://github.com/ctron/trunk/releases - - `cargo binstall trunk-ng` - - `cargo install --git https://github.com/ctron/trunk --branch trunk-ng trunk-ng` (most recent from git) - - `cargo install --path . trunk-ng` (Most recent from local directory) -- [App Setup](https://ctron.github.io/trunk/#app-setup) -- [Assets](https://ctron.github.io/trunk//assets/) -- [Configuration](https://ctron.github.io/trunk//configuration/) -- [CLI Commands](https://ctron.github.io/trunk//commands/) +- [Install](https://trunkrs.dev/#install) + - Download a released binary: https://github.com/thedodd/trunk/releases + - `cargo binstall trunk` + - `cargo install --git https://github.com/thedodd/trunk trunk` (most recent from git) + - `cargo install --path . trunk` (Most recent from local directory) +- [App Setup](https://trunkrs.dev//#app-setup) +- [Assets](https://trunkrs.dev/assets/) +- [Configuration](https://trunkrs.dev/configuration/) +- [CLI Commands](https://trunkrs.dev/commands/) ## Examples @@ -45,4 +41,4 @@ Anyone and everyone is welcome to contribute! Please review the [CONTRIBUTING.md ### License -trunk-ng is licensed under the terms of the MIT License or the Apache License 2.0, at your choosing. +trunk is licensed under the terms of the MIT License or the Apache License 2.0, at your choosing. diff --git a/examples/yew-tls/README.md b/examples/yew-tls/README.md index 33fc8ddc..c3be3853 100644 --- a/examples/yew-tls/README.md +++ b/examples/yew-tls/README.md @@ -2,7 +2,7 @@ An example application demonstrating building a WASM web application using Trunk, Yew & YBC serving with TLS enabled. -Once you've installed Trunk, simply execute `trunk-ng serve --open` from this example's directory, and you +Once you've installed Trunk, simply execute `trunk serve --open` from this example's directory, and you should see the following web application rendered in your browser. The application will be served using the self-signed TLS certificates located in `self_signed_certificates` and configured in `Trunk.toml`. diff --git a/site/config.toml b/site/config.toml index 9b5bfcd9..0fa0b917 100644 --- a/site/config.toml +++ b/site/config.toml @@ -1,6 +1,6 @@ -base_url = "https://ctron.github.io/trunk/" +base_url = "https://trunkrs.dev/" -title = "Trunk NG | Build, bundle & ship your Rust WASM application to the web" +title = "Trunk | Build, bundle & ship your Rust WASM application to the web" compile_sass = true highlight_code = true @@ -12,8 +12,8 @@ theme = "juice" [extra] favicon = "rustacean-flat-happy.svg" -juice_logo_name = "Trunk NG" +juice_logo_name = "Trunk" juice_logo_path = "rustacean-flat-happy.svg" juice_extra_menu = [ - { title = "Github", link = "https://github.com/ctron/trunk"} + { title = "Github", link = "https://github.com/thedodd/trunk"} ] diff --git a/site/content/_index.md b/site/content/_index.md index 0c0885d7..33d9bb17 100644 --- a/site/content/_index.md +++ b/site/content/_index.md @@ -1,11 +1,9 @@ +++ -title = "Trunk NG" +title = "Trunk" sort_by = "weight" +++ -Trunk NG is a WASM web application bundler for Rust. Trunk uses a simple, optional-config pattern for building & bundling WASM, JS snippets & other assets (images, css, scss) via a source HTML file. - -**NOTE:** Trunk NG is a fork of Trunk, adding some fixes and enhancements. Read more about it [here](https://dentrassi.de/2023/10/14/trunk-ng-the-fork-of-trunk/). +Trunk is a WASM web application bundler for Rust. Trunk uses a simple, optional-config pattern for building & bundling WASM, JS snippets & other assets (images, css, scss) via a source HTML file. # Getting Started @@ -18,7 +16,7 @@ First, install Trunk via one of the following options. Download the sources and build them yourself: ```shell -cargo install --locked trunk-ng +cargo install --locked trunk ``` ### Cargo binstall @@ -26,25 +24,25 @@ cargo install --locked trunk-ng You can download a released binary from GitHub releases through [`binstall`](https://github.com/cargo-bins/cargo-binstall). ```shell -cargo binstall trunk-ng +cargo binstall trunk ``` ### GitHub release download -Fetch and unpack a released binary from the [release page](https://github.com/ctron/trunk/releases). +Fetch and unpack a released binary from the [release page](https://github.com/thedodd/trunk/releases). For example (be sure to check for the most recent version): ```shell -wget -qO- https://github.com/ctron/trunk/releases/download/0.17.10/trunk-ng-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- +wget -qO- https://github.com/thedodd/trunk/releases/download/0.17.10/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- ``` ### NixOS -**Note:** `trunk-ng` is currently in the `unstable` channel. It should be part of the next release. +**Note:** `trunk` is currently in the `unstable` channel. It should be part of the next release. ```shell -nix-env -i trunk-ng +nix-env -i trunk ``` ### Brew @@ -53,7 +51,7 @@ nix-env -i trunk-ng without acknowledging it's a fork isn't something that Homebrew does: https://github.com/Homebrew/homebrew-core/pull/150913 ```shell -brew install trunk-ng +brew install trunk ``` ## Additional tools @@ -86,7 +84,7 @@ Trunk uses a source HTML file to drive all asset building and bundling. Trunk al ``` -`trunk-ng build` will produce the following HTML at `dist/index.html`, along with the compiled scss, WASM & the JS loader for the WASM: +`trunk build` will produce the following HTML at `dist/index.html`, along with the compiled scss, WASM & the JS loader for the WASM: ```html @@ -132,4 +130,4 @@ Anyone and everyone is welcome to contribute! Please review the [CONTRIBUTING.md ![](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue?style=flat-square "license badge") -trunk-ng (as well as trunk) is licensed under the terms of the MIT License or the Apache License 2.0, at your choosing. +trunk (as well as trunk) is licensed under the terms of the MIT License or the Apache License 2.0, at your choosing. diff --git a/site/templates/index.html b/site/templates/index.html index eb01c275..0f5e2038 100644 --- a/site/templates/index.html +++ b/site/templates/index.html @@ -15,18 +15,18 @@

Star - - + + - - + +
Discord Chat - + Number of downloads
@@ -56,7 +56,7 @@