d99031ba46
This patch: - moves doclint under utils/ folder - adds tests to verify doclint basic functionality This patch also drops the jasmine as a spec runner for the doclint checks. It turned out it's hard to customize jasmine's behavior, so instead this patch implements a dummy spec runner. The dummy spec runner allows us: - to format messages however we want (the custom jasmine reporter would also allow us to do this) - to avoid `beforeAll` functions which pollute global to pass initialized variables over to specs References #14
31 lines
666 B
Markdown
31 lines
666 B
Markdown
# DocLint
|
|
|
|
**Doclint** is a small program that lints Puppeteer's documentation against
|
|
Puppeteer's source code.
|
|
|
|
Doclint works in a few steps:
|
|
|
|
1. Read sources in `lib/` folder, parse AST trees and extract public API
|
|
2. Read sources in `docs/` folder, render markdown to HTML, use puppeteer to traverse the HTML
|
|
and extract described API
|
|
3. Compare one API to another
|
|
|
|
Doclint is also responsible for general markdown checks, most notably for the table of contents
|
|
relevancy.
|
|
|
|
## Running
|
|
|
|
```bash
|
|
npm run doc
|
|
```
|
|
|
|
## Tests
|
|
|
|
Doclint has its own set of jasmine tests, located at `utils/doclint/test` folder.
|
|
|
|
To execute tests, run:
|
|
|
|
```bash
|
|
npm run test-doclint
|
|
```
|