1
Fork 0
rust/src/librustdoc/html/static/js
2022-10-17 11:44:02 -07:00
..
externs.js Add comments, fixes for 0 sentinel 2022-06-27 14:15:14 -07:00
main.js rustdoc: factor JS mobile scroll lock into its own function 2022-10-17 11:44:02 -07:00
README.md Add some JSDoc comments to rustdoc JS 2021-12-22 14:20:04 -08:00
scrape-examples.js rustdoc: give .line-number / .line-numbers meaningful names 2022-09-26 11:48:03 -07:00
search.js Improve crate selection on rustdoc search results page 2022-08-10 15:55:26 +02:00
settings.js Fix display of settings page 2022-10-15 15:59:00 +02:00
source-script.js rustdoc: factor JS mobile scroll lock into its own function 2022-10-17 11:44:02 -07:00
storage.js Improve click behavior of the source code mobile full-screen "sidebar" 2022-07-01 14:33:34 -07:00

Rustdoc JS

These JavaScript files are incorporated into the rustdoc binary at build time, and are minified and written to the filesystem as part of the doc build process.

We use the Closure Compiler dialect of JSDoc to comment our code and annotate params and return types. To run a check:

./x.py doc library/std
npm i -g google-closure-compiler
google-closure-compiler -W VERBOSE \
  build/<YOUR PLATFORM>/doc/{search-index*.js,crates*.js} \
  src/librustdoc/html/static/js/{search.js,main.js,storage.js} \
  --externs src/librustdoc/html/static/js/externs.js >/dev/null