Add some extra pointers for rustdoc frontend devs
This commit is contained in:
parent
15929a3a91
commit
bc8f00367e
|
|
@ -58,10 +58,13 @@ does is call the `main()` that's in this crate's `lib.rs`, though.)
|
||||||
* If you want to copy those docs to a webserver, copy all of
|
* If you want to copy those docs to a webserver, copy all of
|
||||||
`build/host/doc`, since that's where the CSS, JS, fonts, and landing
|
`build/host/doc`, since that's where the CSS, JS, fonts, and landing
|
||||||
page are.
|
page are.
|
||||||
|
* For frontend debugging, disable the `rust.docs-minification` option in [`config.toml`].
|
||||||
* Use `./x test tests/rustdoc*` to run the tests using a stage1
|
* Use `./x test tests/rustdoc*` to run the tests using a stage1
|
||||||
rustdoc.
|
rustdoc.
|
||||||
* See [Rustdoc internals] for more information about tests.
|
* See [Rustdoc internals] for more information about tests.
|
||||||
|
|
||||||
|
[`config.toml`]: ./building/how-to-build-and-run.md
|
||||||
|
|
||||||
## Code structure
|
## Code structure
|
||||||
|
|
||||||
* All paths in this section are relative to `src/librustdoc` in the rust-lang/rust repository.
|
* All paths in this section are relative to `src/librustdoc` in the rust-lang/rust repository.
|
||||||
|
|
@ -77,6 +80,7 @@ does is call the `main()` that's in this crate's `lib.rs`, though.)
|
||||||
* The tests on the structure of rustdoc HTML output are located in `tests/rustdoc`, where
|
* The tests on the structure of rustdoc HTML output are located in `tests/rustdoc`, where
|
||||||
they're handled by the test runner of bootstrap and the supplementary script
|
they're handled by the test runner of bootstrap and the supplementary script
|
||||||
`src/etc/htmldocck.py`.
|
`src/etc/htmldocck.py`.
|
||||||
|
* Frontend CSS and JavaScript are stored in `html/static/`.
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
|
|
@ -91,6 +95,11 @@ does is call the `main()` that's in this crate's `lib.rs`, though.)
|
||||||
browser-UI-test](https://github.com/GuillaumeGomez/browser-UI-test/) that uses
|
browser-UI-test](https://github.com/GuillaumeGomez/browser-UI-test/) that uses
|
||||||
puppeteer to run tests in a headless browser and check rendering and
|
puppeteer to run tests in a headless browser and check rendering and
|
||||||
interactivity.
|
interactivity.
|
||||||
|
* Additionally, JavaScript type annotations are written using [TypeScript-flavored JSDoc]
|
||||||
|
comments and an external d.ts file. The code itself is plain, valid JavaScript; we only
|
||||||
|
use tsc as a linter.
|
||||||
|
|
||||||
|
[TypeScript-flavored JSDoc]: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html
|
||||||
|
|
||||||
## Constraints
|
## Constraints
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue