Skip to content

Commit 7cc463b

Browse files
docs: add --dev-watch command documentation to CONTRIBUTING.md
- Add comprehensive guide for using the --dev-watch feature - Include example workflow with real command examples - Document auto-rebuild and live reload capabilities - Update pnpm-lock.yaml after merge
1 parent f2cf55b commit 7cc463b

2 files changed

Lines changed: 159 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,38 @@
2020
- Run `pnpm build` and `pnpm test` to make sure the changes work
2121
- Check your work and PR
2222

23+
# Framework Development with --dev-watch
24+
25+
The `--dev-watch` command provides real-time feedback while developing frameworks, add-ons, and starters. It watches for changes in your framework files and automatically rebuilds them.
26+
27+
## Using --dev-watch
28+
29+
To start developing a framework with live rebuilding:
30+
31+
```bash
32+
node [root of the monorepo]/cli/create-tsrouter-app/dist/index.js --dev-watch ./frameworks/react-cra test-app --template typescript --package-manager bun --tailwind --add-ons shadcn
33+
```
34+
35+
This command will:
36+
37+
- Watch the selected folder for changes (the folder with the add-ons in it)
38+
- Automatically rebuild your app / install packages in the target folder when changes are detected (in this case it will install the shadcn addon)
39+
- Show build output, diffs detected and any errors in real-time
40+
41+
## Example Workflow
42+
43+
1. Start the dev watch mode:
44+
45+
```bash
46+
pnpm dev # Build in watch mode
47+
rm -rf test-app && node cli/create-tsrouter-app/dist/index.js --dev-watch ./frameworks/react-cra test-app --template typescript --package-manager bun --tailwind --add-ons shadcn
48+
cd my-test-app && pnpm run dev # run the tsrouter vite app
49+
```
50+
51+
2. Select the framework you want to work on from the displayed list
52+
53+
3. Make changes to the add-ons - they will be automatically rebuilt and your vite app will reflect the changes
54+
2355
# Testing Add-ons and Starters
2456

2557
Create the add-on or starter using the CLI. Then serve it locally from the project directory using `npx static-server`.

pnpm-lock.yaml

Lines changed: 127 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)