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: README.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,10 @@
1
-
# zipview
2
-
3
-
> [!NOTE]
4
-
> experiment for https://github.com/vitest-dev/vitest/issues/9971
1
+
# Vitest Viewer
5
2
6
3
View any static site from a zip file — entirely in the browser, no server needed.
7
4
8
-
A service worker intercepts fetch requests and serves files from the unzipped content via Cache API. The viewer is generic — it doesn't know or care what's inside the zip. Works with Vitest HTML reports, Storybook builds, Vitepress sites, or any static site.
5
+
Available at [viewer.vitest.dev](https://viewer.vitest.dev/).
6
+
7
+
A service worker intercepts fetch requests and serves files from the unzipped content via Cache API. The viewer is generic — it doesn't know or care what's inside the zip. Works with Vitest HTML reports, Storybook builds, VitePress sites, or any static site.
9
8
10
9
## Usage
11
10
@@ -23,13 +22,13 @@ Then drag-and-drop a zip file onto the page. If the zip contains an `index.html`
23
22
## How it works
24
23
25
24
1.`index.html` — drop zone UI, unzips with [fflate](https://github.com/101arrowz/fflate) (CDN), stores files in Cache API, registers service worker, loads content in iframe
26
-
2.`sw.js` — intercepts fetch under `/zipview/site/`, serves from Cache API, generates directory listings when no index.html is found
25
+
2.`sw.js` — intercepts fetch under `/zipview/site/`, serves from Cache API, generates directory listings when no `index.html` is found
27
26
28
27
That's it. Two files, no build step, no dependencies to install.
29
28
30
29
## Motivation
31
30
32
-
CI produces static site artifacts (e.g. Vitest HTML reports via `--reporter=html`). On GitHub Actions, viewing them requires: download zip -> unzip -> run local static server -> open browser.
31
+
CI produces static site artifacts (e.g. Vitest HTML reports via `--reporter=html`). On GitHub Actions, viewing them requires: download zip → unzip → run local static server → open browser.
33
32
34
33
GitLab CI can [preview HTML artifacts directly in the browser](https://docs.gitlab.com/ee/ci/jobs/job_artifacts.html) (powered by GitLab Pages). GitHub Actions does not.
0 commit comments