Add --output CLI flag for roc docs

This commit is contained in:
Richard Feldman 2023-10-19 17:21:27 -04:00
parent 77d2136d00
commit a96752a65a
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
4 changed files with 18 additions and 8 deletions

View file

@ -17,12 +17,9 @@ use roc_region::all::Region;
use std::fs;
use std::path::{Path, PathBuf};
const BUILD_DIR: &str = "./generated-docs";
const LINK_SVG: &str = include_str!("./static/link.svg");
pub fn generate_docs_html(root_file: PathBuf) {
let build_dir = Path::new(BUILD_DIR);
pub fn generate_docs_html(root_file: PathBuf, build_dir: &Path) {
let loaded_module = load_module_for_docs(root_file);
// TODO get these from the platform's source file rather than hardcoding them!