From 22571d0faef2dcc47d86edf4ae3389556d1d3866 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 15 Jun 2026 16:39:02 +0800 Subject: [PATCH 1/2] docs: use giget for single example clone --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6f63f048..27305305 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,14 @@ This repository contains comprehensive examples that demonstrate the Rstack ecos ### Clone single example -To clone a single example, you can use the [gitpick](https://github.com/nrjdalal/gitpick) to clone a sub-directory from the current repository. +To clone a single example, you can use [giget](https://github.com/unjs/giget) to +download a sub-directory from the current repository. For example, to clone the `/rspack/basic` example, run the following command: ```bash # Clone the basic example -npx gitpick https://github.com/rstackjs/rstack-examples/tree/main/rspack/basic +npx giget gh:rstackjs/rstack-examples/rspack/basic my-app # Enter the basic example directory cd basic @@ -32,6 +33,19 @@ cd basic pnpm i ``` +The second argument is the output directory. Pass it explicitly so the example is +created with a clear local folder name. + +You can clone any other example by replacing the path and output directory: + +```bash +# Clone the Rsbuild React example +npx giget gh:rstackjs/rstack-examples/rsbuild/react my-app + +# Clone the Rslib React example +npx giget gh:rstackjs/rstack-examples/rslib/react-basic my-lib +``` + ### Clone all examples To try all examples, you can clone the current repository to your local. From 9febc2d904bc7c023df3fc15dd59ba96962ab14f Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 15 Jun 2026 16:53:43 +0800 Subject: [PATCH 2/2] fix --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 27305305..b66bd89e 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,7 @@ This repository contains comprehensive examples that demonstrate the Rstack ecos ### Clone single example -To clone a single example, you can use [giget](https://github.com/unjs/giget) to -download a sub-directory from the current repository. +To clone a single example, use [giget](https://github.com/unjs/giget) to download a sub-directory from the current repository. For example, to clone the `/rspack/basic` example, run the following command: @@ -26,8 +25,8 @@ For example, to clone the `/rspack/basic` example, run the following command: # Clone the basic example npx giget gh:rstackjs/rstack-examples/rspack/basic my-app -# Enter the basic example directory -cd basic +# Enter the my-app example directory +cd my-app # Install the dependencies pnpm i