Skip to content

Commit dfd2593

Browse files
committed
FEAT(CONTRIBUTING.MD): added guide to using component test server
1 parent 888b658 commit dfd2593

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

CONTRIBUTING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,35 @@ pnpm dev
6565

6666
- Once you made some changes in either package (`headless` or `styled`) or the documentation website (`apps/website`), you will see them immediately reflected on the page.
6767

68+
- Alternitavely, if your only goal is to add a new component, or add new tests to an already exisiting component, you can run the component test server for significant speed gains:
69+
70+
```shell
71+
pnpm dev.ct
72+
```
73+
74+
- This mode is a lot more barebones and requires more background knowledge to use effectively, so keep the folling things in mind:
75+
76+
- 1. Familirize yourself with the following directory structure:
77+
78+
```shell
79+
apps/website/src/routes/docs/[KIT]/[COMPONENT]/examples/
80+
```
81+
82+
- This is the _only place_ where you can add files. So if you wanted to add a select component to the headless kit, you would add all your files to this directory: apps/website/src/routes/docs/headless/select/examples/hero.tsx
83+
84+
- 2. Follow the component test server's URL structure
85+
- The default message on the "home page" of the dev server is a reminder of how to use the address bar to actually view the file you want. By default it would have this structure:
86+
87+
```shell
88+
http://localhost:5173/[KIT]/[COMPONENT]/[EXAMPLE]
89+
```
90+
91+
- So if you wanted to see the hero example for the headless select you would go here:
92+
93+
```shell
94+
http://localhost:5173/headless/select/hero/
95+
```
96+
6897
Below is a list of other commands that you might find useful:
6998

7099
- Build the qwik-ui documentation:

0 commit comments

Comments
 (0)