feat: implement the bDS2-compatible core Lua API
This commit is contained in:
12
crates/bds-core/examples/generate_scripting_docs.rs
Normal file
12
crates/bds-core/examples/generate_scripting_docs.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use std::fs;
|
||||
use std::path::Path;
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("../..");
|
||||
let docs = root.join("docs/scripting");
|
||||
let manifest = bds_core::scripting::api_manifest();
|
||||
fs::write(docs.join("API_REFERENCE.md"), manifest.render_reference())?;
|
||||
fs::write(docs.join("TYPES.md"), manifest.render_types())?;
|
||||
fs::write(docs.join("completions.json"), manifest.render_completions())?;
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user