You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+17-7Lines changed: 17 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,11 @@ The demo shows how the library transforms common Python error traces (from both
17
17
-**KeyError**: Dictionary key not found
18
18
-**ZeroDivisionError**: Division by zero
19
19
20
-
Each example shows:
21
-
1. The original Python traceback
22
-
2. The code that caused the error
23
-
3. The friendly explanation generated by the library
20
+
The demo renders a full-width table with:
21
+
1. A linkable row id for each example (URL hash)
22
+
2. The example title and runtime
23
+
3. The original code and traceback
24
+
4. The friendly explanation generated by the library
24
25
25
26
### Usage
26
27
@@ -43,9 +44,16 @@ Then in the root directory of the project:
43
44
44
45
2. Navigate to `http://localhost:8000/docs`
45
46
46
-
## Local demo
47
+
###Local source switching (development only)
47
48
48
-
The `local-demo.html` file in this directory is a copy of the hosted demo that can be run locally, ie. against the local build of the library. Useful for development and testing.
49
+
When running locally, the demo shows a source switch bar at the top:
50
+
51
+
- default: vendored build (`docs/vendor/...`)
52
+
- local mode: local build (`dist/index.browser.js`) via `?local=true`
53
+
54
+
Local mode can be used to test changes to the library on-the-fly, as long as you have a local build running (eg. via `npm run dev:build`).
55
+
56
+
On hosted environments (including GitHub Pages), the source switch UI is hidden and the demo always uses the vendored build.
49
57
50
58
### Usage
51
59
@@ -63,5 +71,7 @@ The `local-demo.html` file in this directory is a copy of the hosted demo that c
63
71
npx http-server -p 8000
64
72
```
65
73
66
-
3. Navigate to `http://localhost:8000/docs/local-demo.html`
0 commit comments