mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
[doclint] Move doclint under utils/
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
This commit is contained in:
30
utils/doclint/README.md
Normal file
30
utils/doclint/README.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# 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
|
||||
```
|
||||
Reference in New Issue
Block a user