@@ -13,6 +13,8 @@ use std::path::Path;
13
13
14
14
use crate :: errors:: * ;
15
15
16
+ pub static IFRAME : & [ u8 ] = include_bytes ! ( "iframe.html" ) ;
17
+ pub static WASM_ENTRY_MJS : & [ u8 ] = include_bytes ! ( "wasm-entry.mjs" ) ;
16
18
pub static INDEX : & [ u8 ] = include_bytes ! ( "index.hbs" ) ;
17
19
pub static HEAD : & [ u8 ] = include_bytes ! ( "head.hbs" ) ;
18
20
pub static REDIRECT : & [ u8 ] = include_bytes ! ( "redirect.hbs" ) ;
@@ -62,6 +64,8 @@ pub struct Theme {
62
64
pub ayu_highlight_css : Vec < u8 > ,
63
65
pub highlight_js : Vec < u8 > ,
64
66
pub clipboard_js : Vec < u8 > ,
67
+ pub iframe_html : Vec < u8 > ,
68
+ pub wasm_entry_mjs : Vec < u8 > ,
65
69
}
66
70
67
71
impl Theme {
@@ -79,6 +83,8 @@ impl Theme {
79
83
// Check for individual files, if they exist copy them across
80
84
{
81
85
let files = vec ! [
86
+ ( theme_dir. join( "iframe.html" ) , & mut theme. iframe_html) ,
87
+ ( theme_dir. join( "wasm-entry.mjs" ) , & mut theme. wasm_entry_mjs) ,
82
88
( theme_dir. join( "index.hbs" ) , & mut theme. index) ,
83
89
( theme_dir. join( "head.hbs" ) , & mut theme. head) ,
84
90
( theme_dir. join( "redirect.hbs" ) , & mut theme. redirect) ,
@@ -161,6 +167,8 @@ impl Default for Theme {
161
167
ayu_highlight_css : AYU_HIGHLIGHT_CSS . to_owned ( ) ,
162
168
highlight_js : HIGHLIGHT_JS . to_owned ( ) ,
163
169
clipboard_js : CLIPBOARD_JS . to_owned ( ) ,
170
+ iframe_html : IFRAME . to_owned ( ) ,
171
+ wasm_entry_mjs : WASM_ENTRY_MJS . to_owned ( ) ,
164
172
}
165
173
}
166
174
}
@@ -248,6 +256,8 @@ mod tests {
248
256
ayu_highlight_css : Vec :: new ( ) ,
249
257
highlight_js : Vec :: new ( ) ,
250
258
clipboard_js : Vec :: new ( ) ,
259
+ iframe_html : Vec :: new ( ) ,
260
+ wasm_entry_mjs : Vec :: new ( ) ,
251
261
} ;
252
262
253
263
assert_eq ! ( got, empty) ;
0 commit comments