refactor: Remove jQuery file (#562)
This commit is contained in:
parent
80f42675d6
commit
3d1a311638
|
@ -156,7 +156,6 @@ impl HtmlHandlebars {
|
||||||
self.write_file(destination, "book.js", &theme.js)?;
|
self.write_file(destination, "book.js", &theme.js)?;
|
||||||
self.write_file(destination, "book.css", &theme.css)?;
|
self.write_file(destination, "book.css", &theme.css)?;
|
||||||
self.write_file(destination, "favicon.png", &theme.favicon)?;
|
self.write_file(destination, "favicon.png", &theme.favicon)?;
|
||||||
self.write_file(destination, "jquery.js", &theme.jquery)?;
|
|
||||||
self.write_file(destination, "highlight.css", &theme.highlight_css)?;
|
self.write_file(destination, "highlight.css", &theme.highlight_css)?;
|
||||||
self.write_file(destination, "tomorrow-night.css", &theme.tomorrow_night_css)?;
|
self.write_file(destination, "tomorrow-night.css", &theme.tomorrow_night_css)?;
|
||||||
self.write_file(destination, "ayu-highlight.css", &theme.ayu_highlight_css)?;
|
self.write_file(destination, "ayu-highlight.css", &theme.ayu_highlight_css)?;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -15,7 +15,6 @@ pub static HIGHLIGHT_JS: &'static [u8] = include_bytes!("highlight.js");
|
||||||
pub static TOMORROW_NIGHT_CSS: &'static [u8] = include_bytes!("tomorrow-night.css");
|
pub static TOMORROW_NIGHT_CSS: &'static [u8] = include_bytes!("tomorrow-night.css");
|
||||||
pub static HIGHLIGHT_CSS: &'static [u8] = include_bytes!("highlight.css");
|
pub static HIGHLIGHT_CSS: &'static [u8] = include_bytes!("highlight.css");
|
||||||
pub static AYU_HIGHLIGHT_CSS: &'static [u8] = include_bytes!("ayu-highlight.css");
|
pub static AYU_HIGHLIGHT_CSS: &'static [u8] = include_bytes!("ayu-highlight.css");
|
||||||
pub static JQUERY: &'static [u8] = include_bytes!("jquery.js");
|
|
||||||
pub static CLIPBOARD_JS: &'static [u8] = include_bytes!("clipboard.min.js");
|
pub static CLIPBOARD_JS: &'static [u8] = include_bytes!("clipboard.min.js");
|
||||||
pub static STORE_JS: &'static [u8] = include_bytes!("store.js");
|
pub static STORE_JS: &'static [u8] = include_bytes!("store.js");
|
||||||
pub static FONT_AWESOME: &'static [u8] = include_bytes!("_FontAwesome/css/font-awesome.min.css");
|
pub static FONT_AWESOME: &'static [u8] = include_bytes!("_FontAwesome/css/font-awesome.min.css");
|
||||||
|
@ -51,7 +50,6 @@ pub struct Theme {
|
||||||
pub highlight_js: Vec<u8>,
|
pub highlight_js: Vec<u8>,
|
||||||
pub clipboard_js: Vec<u8>,
|
pub clipboard_js: Vec<u8>,
|
||||||
pub store_js: Vec<u8>,
|
pub store_js: Vec<u8>,
|
||||||
pub jquery: Vec<u8>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Theme {
|
impl Theme {
|
||||||
|
@ -78,7 +76,6 @@ impl Theme {
|
||||||
(theme_dir.join("highlight.css"), &mut theme.highlight_css),
|
(theme_dir.join("highlight.css"), &mut theme.highlight_css),
|
||||||
(theme_dir.join("tomorrow-night.css"), &mut theme.tomorrow_night_css),
|
(theme_dir.join("tomorrow-night.css"), &mut theme.tomorrow_night_css),
|
||||||
(theme_dir.join("ayu-highlight.css"), &mut theme.ayu_highlight_css),
|
(theme_dir.join("ayu-highlight.css"), &mut theme.ayu_highlight_css),
|
||||||
(theme_dir.join("jquery.js"), &mut theme.jquery),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
for (filename, dest) in files {
|
for (filename, dest) in files {
|
||||||
|
@ -110,7 +107,6 @@ impl Default for Theme {
|
||||||
highlight_js: HIGHLIGHT_JS.to_owned(),
|
highlight_js: HIGHLIGHT_JS.to_owned(),
|
||||||
clipboard_js: CLIPBOARD_JS.to_owned(),
|
clipboard_js: CLIPBOARD_JS.to_owned(),
|
||||||
store_js: STORE_JS.to_owned(),
|
store_js: STORE_JS.to_owned(),
|
||||||
jquery: JQUERY.to_owned(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,7 +178,6 @@ mod tests {
|
||||||
highlight_js: Vec::new(),
|
highlight_js: Vec::new(),
|
||||||
clipboard_js: Vec::new(),
|
clipboard_js: Vec::new(),
|
||||||
store_js: Vec::new(),
|
store_js: Vec::new(),
|
||||||
jquery: Vec::new(),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
assert_eq!(got, empty);
|
assert_eq!(got, empty);
|
||||||
|
|
Loading…
Reference in New Issue