simple (Prose test fixture)
A counter on one static page: plain HTML, CSS and JS, served and built by Vite, with no runtime dependencies and no framework.
It is the smallest prose test case (tests). Every file
follows the prose convention: comments marked @prose (/** @prose … */ in CSS and JS,
<!-- @prose … --> in HTML) are prose, and each one explains the code that follows it.
pnpm install
pnpm dev
Code
- index.html
The counter's only page. It holds the markup the script needs, and nothing else: an output that shows the count, and the buttons that change it.
- main.js
The counter's behavior: holds the count, applies a step when a button is pressed, and renders the result into the page.
- style.css
Styles for the counter. Colors are tokens on
:rootwith a dark-mode override, so the page follows the system theme.
No prose yet
Other files