Skip to content

Commit 8b6a2f9

Browse files
authored
docs: use giget for single example clone (#474)
1 parent 2a57932 commit 8b6a2f9

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,34 @@ This repository contains comprehensive examples that demonstrate the Rstack ecos
1717

1818
### Clone single example
1919

20-
To clone a single example, you can use the [gitpick](https://github.com/nrjdalal/gitpick) to clone a sub-directory from the current repository.
20+
To clone a single example, use [giget](https://github.com/unjs/giget) to download a sub-directory from the current repository.
2121

2222
For example, to clone the `/rspack/basic` example, run the following command:
2323

2424
```bash
2525
# Clone the basic example
26-
npx gitpick https://github.com/rstackjs/rstack-examples/tree/main/rspack/basic
26+
npx giget gh:rstackjs/rstack-examples/rspack/basic my-app
2727

28-
# Enter the basic example directory
29-
cd basic
28+
# Enter the my-app example directory
29+
cd my-app
3030

3131
# Install the dependencies
3232
pnpm i
3333
```
3434

35+
The second argument is the output directory. Pass it explicitly so the example is
36+
created with a clear local folder name.
37+
38+
You can clone any other example by replacing the path and output directory:
39+
40+
```bash
41+
# Clone the Rsbuild React example
42+
npx giget gh:rstackjs/rstack-examples/rsbuild/react my-app
43+
44+
# Clone the Rslib React example
45+
npx giget gh:rstackjs/rstack-examples/rslib/react-basic my-lib
46+
```
47+
3548
### Clone all examples
3649

3750
To try all examples, you can clone the current repository to your local.

0 commit comments

Comments
 (0)