Rename theme-checker option to check-theme
This commit is contained in:
parent
82872addf1
commit
8f44c604d2
@ -368,7 +368,7 @@ you'll need to this flag as follows:
|
||||
$ rustdoc src/lib.rs --themes /path/to/your/theme/file.css
|
||||
```
|
||||
|
||||
### `theme-checker`: check if your themes implement all the required rules
|
||||
### `check-theme`: check if your themes implement all the required rules
|
||||
|
||||
This flag allows you to check if your themes implement the necessary CSS rules. To put it more
|
||||
simply, when adding a new theme, it needs to implements all the CSS rules present in the "light"
|
||||
@ -377,5 +377,5 @@ CSS theme.
|
||||
You can use this flag like this:
|
||||
|
||||
```bash
|
||||
$ rustdoc src/lib.rs --theme-checker /path/to/your/theme/file.css
|
||||
$ rustdoc src/lib.rs --check-theme /path/to/your/theme/file.css
|
||||
```
|
||||
|
@ -304,14 +304,14 @@ $ rustdoc src/lib.rs -Z unstable-options --themes theme.css
|
||||
|
||||
Giving this flag to `rustdoc` will make it copy your theme into the generated crate docs and enable
|
||||
it in the theme selector. Note that `rustdoc` will reject your theme file if it doesn't style
|
||||
everything the "light" theme does. See `--theme-checker` below for details.
|
||||
everything the "light" theme does. See `--check-theme` below for details.
|
||||
|
||||
### `--theme-checker`: verify theme CSS for validity
|
||||
### `--check-theme`: verify theme CSS for validity
|
||||
|
||||
Using this flag looks like this:
|
||||
|
||||
```bash
|
||||
$ rustdoc -Z unstable-options --theme-checker theme.css
|
||||
$ rustdoc -Z unstable-options --check-theme theme.css
|
||||
```
|
||||
|
||||
Before including your theme in crate docs, `rustdoc` will compare all the CSS rules it contains
|
||||
|
@ -59,7 +59,7 @@ pub static RUST_FAVICON: &'static [u8] = include_bytes!("static/favicon.ico");
|
||||
/// The built-in themes given to every documentation site.
|
||||
pub mod themes {
|
||||
/// The "light" theme, selected by default when no setting is available. Used as the basis for
|
||||
/// the `--theme-checker` functionality.
|
||||
/// the `--check-theme` functionality.
|
||||
pub static LIGHT: &'static str = include_str!("static/themes/light.css");
|
||||
|
||||
/// The "dark" theme.
|
||||
|
@ -256,8 +256,8 @@ fn opts() -> Vec<RustcOptGroup> {
|
||||
"additional themes which will be added to the generated docs",
|
||||
"FILES")
|
||||
}),
|
||||
stable("theme-checker", |o| {
|
||||
o.optmulti("", "theme-checker",
|
||||
stable("check-theme", |o| {
|
||||
o.optmulti("", "check-theme",
|
||||
"check if given theme is valid",
|
||||
"FILES")
|
||||
}),
|
||||
|
@ -39,7 +39,7 @@ fn main() {
|
||||
exit(1);
|
||||
}
|
||||
let status = Command::new(rustdoc_bin)
|
||||
.args(&["-Z", "unstable-options", "--theme-checker"])
|
||||
.args(&["-Z", "unstable-options", "--check-theme"])
|
||||
.args(&themes)
|
||||
.status()
|
||||
.expect("failed to execute child");
|
||||
|
Loading…
x
Reference in New Issue
Block a user