Skip to content

Commit

Permalink
Fix issue w/ logger, update to latest mdbook-preprocessor-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Sep 29, 2024
1 parent bb2b1bd commit 3f26246
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 140 deletions.
124 changes: 29 additions & 95 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/mdbook-quiz-schema/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ json-schema = ["dep:schemars", "dep:serde_json"]
ts = ["dep:ts-rs"]

[dependencies]
serde = {version = "1.0.188", features = ["derive"]}
serde = {version = "1", features = ["derive"]}
ts-rs = {version = "7.0.0", optional = true}
schemars = {version = "0.8.15", optional = true}
serde_json = {version = "1.0.107", optional = true}
serde_json = {version = "1", optional = true}

[dev-dependencies]
toml = { workspace = true }
8 changes: 5 additions & 3 deletions crates/mdbook-quiz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,18 @@ regex = "1"
html-escape = "0.2"
toml = { workspace = true }
mdbook = "= 0.4.25"
mdbook-preprocessor-utils = "0.1"
mdbook-aquascope = {version = "0.3", optional = true}
mdbook-preprocessor-utils = "0.2.0"
mdbook-aquascope = {version = "0.3.4", optional = true}
mdbook-quiz-schema = {path = "../mdbook-quiz-schema", version = "0.3.4"}
mdbook-quiz-validate = {path = "../mdbook-quiz-validate", version = "0.3.4"}
toml_edit = "0.20.0"
uuid = {version = "1.4.1", features = ["v4"]}
log = "0.4.20"
clap = { version = "4", features = ["derive"] }

[dev-dependencies]
mdbook-preprocessor-utils = { version = "0.1", features = ["testing"] }
mdbook-preprocessor-utils = { version = "0.2.0", features = ["testing"] }

[build-dependencies]
anyhow = { workspace = true }
mdbook-preprocessor-utils = "0.2.0"
11 changes: 2 additions & 9 deletions crates/mdbook-quiz/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use anyhow::Result;
use std::{fs, path::Path, process::Command};
use std::{path::Path, process::Command};

const BINDINGS_DIR: &str = "../../js/packages/quiz/src/bindings";
const JS_DIST_DIR: &str = "../../js/packages/quiz-embed/dist";
Expand All @@ -24,14 +24,7 @@ fn main() -> Result<()> {
}
}

println!("cargo:rerun-if-changed={JS_DIST_DIR}");
let entries = fs::read_dir(js_dist_dir)?;
let local_js_dist_dir = Path::new(LOCAL_JS_DIST_DIR);
fs::create_dir_all(local_js_dist_dir)?;
for entry in entries {
let path = entry?.path();
fs::copy(&path, local_js_dist_dir.join(path.file_name().unwrap()))?;
}
mdbook_preprocessor_utils::copy_assets(LOCAL_JS_DIST_DIR, JS_DIST_DIR)?;

Ok(())
}
Loading

0 comments on commit 3f26246

Please sign in to comment.