From 7dad6239470ddbc8a12207110e745714f49d4999 Mon Sep 17 00:00:00 2001 From: glen Date: Thu, 10 Apr 2025 23:13:51 +0000 Subject: [PATCH 1/2] Add a top-level run command to the "play with prototype" It's very convenient for me to just stay in the top-level directory of a project. This change shows how to do that for `trunk`. I haven't figured out how to do it with `cargo test`, however. If you happen to know, feel free to edit. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1ea3302..1cb1297 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ The latest prototype is in the folder `app-proto`. It includes both a user inter 2. Call `trunk serve --release` to build and serve the prototype * *The crates the prototype depends on will be downloaded and served automatically* * *For a faster build, at the expense of a much slower prototype, you can call `trunk serve` without the `--release` flag* + * *If you want to run from the top level of the project, you can say `trunk --config app-proto serve [--release]`* 3. In a web browser, visit one of the URLs listed under the message `INFO 📡 server listening at:` * *Touching any file in the `app-proto` folder will make Trunk rebuild and live-reload the prototype* 4. Press *ctrl+C* in the shell where Trunk is running to stop serving the prototype -- 2.43.0 From 664b3d87bc13ea436900ca5c98ec5b5473778fd6 Mon Sep 17 00:00:00 2001 From: Aaron Fenyes Date: Thu, 17 Apr 2025 15:11:02 -0700 Subject: [PATCH 2/2] Make "Play with prototype" less location-specific --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1cb1297..3a29eb0 100644 --- a/README.md +++ b/README.md @@ -37,11 +37,10 @@ The latest prototype is in the folder `app-proto`. It includes both a user inter ### Play with the prototype -1. Go into the `app-proto` folder -2. Call `trunk serve --release` to build and serve the prototype +1. From the `app-proto` folder, call `trunk serve --release` to build and serve the prototype * *The crates the prototype depends on will be downloaded and served automatically* * *For a faster build, at the expense of a much slower prototype, you can call `trunk serve` without the `--release` flag* - * *If you want to run from the top level of the project, you can say `trunk --config app-proto serve [--release]`* + * *If you want to stay in the top-level folder, you can call `trunk serve --config app-proto [--release]`* from there instead. 3. In a web browser, visit one of the URLs listed under the message `INFO 📡 server listening at:` * *Touching any file in the `app-proto` folder will make Trunk rebuild and live-reload the prototype* 4. Press *ctrl+C* in the shell where Trunk is running to stop serving the prototype -- 2.43.0