From e6c08f1a12e6b7c7839b1765e0eaf6ad63befdad Mon Sep 17 00:00:00 2001 From: Jurrian Fahner Date: Sat, 3 Aug 2024 16:52:46 +0200 Subject: [PATCH 1/2] Resolve error for windows users: Access is denied. (os error 5) --- .../getting-started/build-a-sample-app.mdx | 18 +++++++++++++++++- .../getting-started/build-a-sample-app.mdx | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/website/docs/getting-started/build-a-sample-app.mdx b/website/docs/getting-started/build-a-sample-app.mdx index eaae122882d..e35b63ff7b3 100644 --- a/website/docs/getting-started/build-a-sample-app.mdx +++ b/website/docs/getting-started/build-a-sample-app.mdx @@ -8,12 +8,28 @@ the boilerplate needed for a basic Yew app or manually set up a small project. ## Using a starter template Install [`cargo-generate`](https://github.com/cargo-generate/cargo-generate) by following their installation instructions -then run the following command: +then take the following steps: + +### Checkout and customize project ```shell cargo generate --git https://github.com/yewstack/yew-trunk-minimal-template ``` +### Build project + +This step is only needed when this guide has been run on Microsoft windows. + +```shell +trunk build +``` + +### Run project + +```shell +trunk serve +``` + ## Setting up the application manually ### Create Project diff --git a/website/versioned_docs/version-0.21/getting-started/build-a-sample-app.mdx b/website/versioned_docs/version-0.21/getting-started/build-a-sample-app.mdx index eaae122882d..e35b63ff7b3 100644 --- a/website/versioned_docs/version-0.21/getting-started/build-a-sample-app.mdx +++ b/website/versioned_docs/version-0.21/getting-started/build-a-sample-app.mdx @@ -8,12 +8,28 @@ the boilerplate needed for a basic Yew app or manually set up a small project. ## Using a starter template Install [`cargo-generate`](https://github.com/cargo-generate/cargo-generate) by following their installation instructions -then run the following command: +then take the following steps: + +### Checkout and customize project ```shell cargo generate --git https://github.com/yewstack/yew-trunk-minimal-template ``` +### Build project + +This step is only needed when this guide has been run on Microsoft windows. + +```shell +trunk build +``` + +### Run project + +```shell +trunk serve +``` + ## Setting up the application manually ### Create Project From d4373cd7c3d6517a7ad530f5f18f426ee1566b2b Mon Sep 17 00:00:00 2001 From: Jurrian Fahner Date: Sun, 18 Aug 2024 10:41:52 +0200 Subject: [PATCH 2/2] Add note for trunk windows bug --- website/docs/getting-started/build-a-sample-app.mdx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/website/docs/getting-started/build-a-sample-app.mdx b/website/docs/getting-started/build-a-sample-app.mdx index e35b63ff7b3..54e80e06b5e 100644 --- a/website/docs/getting-started/build-a-sample-app.mdx +++ b/website/docs/getting-started/build-a-sample-app.mdx @@ -16,20 +16,15 @@ then take the following steps: cargo generate --git https://github.com/yewstack/yew-trunk-minimal-template ``` -### Build project - -This step is only needed when this guide has been run on Microsoft windows. - -```shell -trunk build -``` - ### Run project ```shell trunk serve ``` +> **Note** +Trunk [has a bug](https://github.com/trunk-rs/trunk/issues/852) on windows when `trunk serve` command fails. To workaround the issue you can run `trunk build` before running `trunk serve`. + ## Setting up the application manually ### Create Project