repoview 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DEVELOPMENT.md +3 -2
- package/README.md +7 -1
- package/package.json +1 -1
package/DEVELOPMENT.md
CHANGED
|
@@ -4,12 +4,12 @@ This doc collects the “how it works” details so `README.md` can stay product
|
|
|
4
4
|
|
|
5
5
|
## Project layout
|
|
6
6
|
|
|
7
|
-
- `src/server.js`: Express server + routes (`/tree`, `/blob`, `/raw`, `/events`)
|
|
7
|
+
- `src/server.js`: Express server + routes (`/tree`, `/blob`, `/raw`, `/diff`, `/events`)
|
|
8
8
|
- `src/markdown.js`: Markdown rendering + link/image rewriting + sanitization
|
|
9
9
|
- `src/linkcheck.js`: broken-link scanner (Markdown → rendered HTML → internal link validation)
|
|
10
10
|
- `src/gitignore.js`: `.gitignore` matcher (used for hiding + scanner noise reduction)
|
|
11
11
|
- `src/views.js`: HTML templates (mobile-first top bar + GitHub-style Markdown shell)
|
|
12
|
-
- `public/`: CSS + client JS (live reload, KaTeX render, Mermaid render, query preservation)
|
|
12
|
+
- `public/`: CSS + client JS (live reload, KaTeX render, Mermaid render, diff collapse, query preservation)
|
|
13
13
|
|
|
14
14
|
## Running locally
|
|
15
15
|
|
|
@@ -28,6 +28,7 @@ Useful flags:
|
|
|
28
28
|
- `GET /blob/<path>`: file view (Markdown rendered; non-Markdown shown as highlighted text)
|
|
29
29
|
- `GET /raw/<path>`: raw bytes (used for images and downloads)
|
|
30
30
|
- `GET /events`: Server-Sent Events stream for live reload
|
|
31
|
+
- `GET /diff`: diff view — compare working tree against a base ref (`?base=HEAD` default; accepts branches, tags)
|
|
31
32
|
- `GET /broken-links`: HTML report for broken internal links (Markdown docs)
|
|
32
33
|
- `GET /broken-links.json`: report state + raw results
|
|
33
34
|
|
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ Not affiliated with GitHub.
|
|
|
10
10
|
|
|
11
11
|
- GitHub-like browsing for local repos (tree / file / raw views)
|
|
12
12
|
- GitHub-style Markdown rendering (README-friendly; close-to-GitHub)
|
|
13
|
+
- Diff view — browse uncommitted changes against HEAD, branches, or tags (`/diff`)
|
|
13
14
|
- Live reload when files change (SSE with polling fallback)
|
|
14
15
|
- Broken internal link discovery for docs (`/broken-links`)
|
|
15
16
|
- Respects `.gitignore` by default (toggleable)
|
|
@@ -62,10 +63,15 @@ Bind to all interfaces, then open the host URL from another device:
|
|
|
62
63
|
npm start -- --repo /path/to/repo --host 0.0.0.0 --port 8890
|
|
63
64
|
```
|
|
64
65
|
|
|
66
|
+
## Diff view
|
|
67
|
+
|
|
68
|
+
Navigate to `/diff` (or click the "Diff" link in the top bar) to see uncommitted changes. Use the dropdown to compare against HEAD, a branch, or a tag. File sections are collapsible — click a file header to collapse/expand.
|
|
69
|
+
|
|
65
70
|
## UI toggles
|
|
66
71
|
|
|
67
|
-
- `?ignored=1` shows files ignored by the repo
|
|
72
|
+
- `?ignored=1` shows files ignored by the repo's `.gitignore` (default: hidden)
|
|
68
73
|
- `?watch=0` disables browser auto-refresh for that tab
|
|
74
|
+
- `?base=<ref>` selects the diff comparison base (default: `HEAD`)
|
|
69
75
|
|
|
70
76
|
## Development
|
|
71
77
|
|