docwright is a library that generates UI documentation from Playwright-style test scripts. It automates the process of documenting your application's user interface.
Install docwright
bun install @docwright/core
Due to Node.js's limitations, docwright currently only works with Bun. Read more
Create a
docwright.config.tsfile.bunx docwright init
Run docwright
bunx docwright generate
Create a file matching your docwright.config.ts glob pattern.
Example: portfolio.docwright.ts
import{describe,scenario,text,screenshot,highlight,}from"@docwright/core";describe("suiram.dev portfolio",()=>{scenario("How to book a call",async({ page })=>{awaittext("Navigate to https://suiram.dev");awaitpage.goto("https://suiram.dev");awaittext("Click the book a call button");awaithighlight(page.locator("a[href='https://calcom.suiram.dev/suiramdev/30min']"));awaitscreenshot(page);});});Thanks to:
