https://github.com/suiramdev/docwright
docwright is a library that generates UI documentation from Playwright-style test scripts. It automates the process of documenting your application's user interface.
https://github.com/suiramdev/docwright
automation bun documentation documentation-tool javascript nodejs npm npm-package package playwright tools typescript user-interface vitest
Last synced: 2 months ago
JSON representation
docwright is a library that generates UI documentation from Playwright-style test scripts. It automates the process of documenting your application's user interface.
- Host: GitHub
- URL: https://github.com/suiramdev/docwright
- Owner: suiramdev
- License: gpl-3.0
- Created: 2025-02-13T14:42:25.000Z (about 1 year ago)
- Default Branch: develop
- Last Pushed: 2025-02-17T22:33:16.000Z (about 1 year ago)
- Last Synced: 2025-02-17T23:23:25.293Z (about 1 year ago)
- Topics: automation, bun, documentation, documentation-tool, javascript, nodejs, npm, npm-package, package, playwright, tools, typescript, user-interface, vitest
- Language: TypeScript
- Homepage:
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
docwright
automate your application's UI documentation
docwright is a library that generates UI documentation from Playwright-style test scripts. It automates the process of documenting your application's user interface.
[Read API](./docs/api.md)
## Quick Start
1. **Install docwright**
```bash
bun install @docwright/core
```
> Due to Node.js's limitations, docwright currently only works with Bun. [Read more](#technical-details)
2. **Create a `docwright.config.ts` file.**
```bash
bunx docwright init
```
[Example `docwright.config.ts`](./playground/docwright.config.ts)
3. **Run docwright**
```bash
bunx docwright generate
```
### Create your first scenario
Create a file matching your docwright.config.ts glob pattern.
Example: [portfolio.docwright.ts](./playground/portfolio.docwright.ts)
```typescript
import {
describe,
scenario,
text,
screenshot,
highlight,
} from "@docwright/core";
describe("suiram.dev portfolio", () => {
scenario("How to book a call", async ({ page }) => {
await text("Navigate to https://suiram.dev");
await page.goto("https://suiram.dev");
await text("Click the book a call button");
await highlight(
page.locator("a[href='https://calcom.suiram.dev/suiramdev/30min']")
);
await screenshot(page);
});
});
```
## Credits
Thanks to:
- [@yanndarwish](https://github.com/yanndarwish)
- [@aziv7](https://github.com/aziv7)