rust/src/librustdoc/html/static/js
Michael Howell 859bbc5def rustdoc: clean up source sidebar hide button
This is a redesign of the feature, with parts pulled from
https://github.com/rust-lang/rust/pull/119049
but with a button that looks more like a button and matches the
one used on other sidebar pages.
2023-12-17 23:06:31 -07:00
..
externs.js rustdoc-search: use set ops for ranking and filtering 2023-12-13 10:37:15 -07:00
main.js rustdoc: clean up source sidebar hide button 2023-12-17 23:06:31 -07:00
README.md Add some JSDoc comments to rustdoc JS 2021-12-22 14:20:04 -08:00
scrape-examples.js Improve calculation of scraped example minimized height 2022-12-07 10:42:09 -08:00
search.js rustdoc-search: remove parallel searchWords array 2023-12-15 16:26:35 -07:00
settings.js Rollup merge of #115660 - notriddle:notriddle/sidebar-resize, r=GuillaumeGomez 2023-12-15 11:51:23 +01:00
src-script.js rustdoc: clean up source sidebar hide button 2023-12-17 23:06:31 -07:00
storage.js Rollup merge of #115660 - notriddle:notriddle/sidebar-resize, r=GuillaumeGomez 2023-12-15 11:51:23 +01: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