Commit graph

8 commits

Author SHA1 Message Date
Joshua Nelson
f77ebd4ffa Add unstable option to only emit shared/crate-specific files
The intended use case is for docs.rs, which can now copy exactly the
files it cares about, rather than having to guess based on whether they
have a resource suffix or not. In particular, some files have a resource
suffix but cannot be shared between crates: https://github.com/rust-lang/docs.rs/pull/1312#issuecomment-798783688

The end goal is to fix https://github.com/rust-lang/docs.rs/issues/1327
by reverting https://github.com/rust-lang/docs.rs/pull/1324.

This obsoletes `--print=unversioned-files`, which I plan to remove as
soon as docs.rs stops using it.
2021-03-25 20:03:44 -04:00
Joshua Nelson
7c89cc4a6f Add SharedResource abstraction and use it in write_shared
This cleans up the code quite a bit, and also makes the next commit much
easier.
2021-03-25 11:40:32 -04:00
Yuki Okushi
a34cc6bbab
Rollup merge of #82732 - GuillaumeGomez:remove-theme-file, r=Nemo157
Remove theme.js file

Fixes #82616.

The first commit moves the `theme.js` file into `main.js`, which requires to also run a small `.replace` on the `main.js` content.

The second commit is just a small cleanup to centralize DOM ids.

Since it removes a file from rustdoc output: cc `@rust-lang/docs-rs`

cc `@jsha`
r? `@jyn514`
2021-03-23 10:15:40 +09:00
Trevor Spiteri
87d17bb9e8 Update Source Code Pro and include italics 2021-03-07 09:13:27 +01:00
Joshua Nelson
173d2aaa00 Add an unstable option to print all unversioned files
This allows sharing those files between different doc invocations
without having to know their names ahead of time.
2021-03-05 15:31:30 -05:00
Joshua Nelson
69a879f3d1 Store UNVERSIONED_FILES in a data structure
This allows querying it programatically.
2021-03-05 10:55:15 -05:00
Guillaume Gomez
3ab4f9a204 Remove theme.js file creation and move its code inside main.js 2021-03-05 16:26:30 +01:00
Nicholas-Baron
fd14e38612 Moved write_shared to its own file 2021-03-04 10:24:56 -08:00