1 | # DocLint
|
2 |
|
3 | **Doclint** is a small program that lints Puppeteer's documentation against
|
4 | Puppeteer's source code.
|
5 |
|
6 | Doclint works in a few steps:
|
7 |
|
8 | 1. Read sources in `lib/` folder, parse AST trees and extract public API
|
9 | 2. Read sources in `docs/` folder, render markdown to HTML, use puppeteer to traverse the HTML
|
10 | and extract described API
|
11 | 3. Compare one API to another
|
12 |
|
13 | Doclint is also responsible for general markdown checks, most notably for the table of contents
|
14 | relevancy.
|
15 |
|
16 | ## Running
|
17 |
|
18 | ```bash
|
19 | npm run doc
|
20 | ```
|
21 |
|
22 | ## Tests
|
23 |
|
24 | Doclint has its own set of jasmine tests, located at `utils/doclint/test` folder.
|
25 |
|
26 | To execute tests, run:
|
27 |
|
28 | ```bash
|
29 | npm run test-doclint
|
30 | ```
|