mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
Moved docs/src/main.rs to docs/src/lib.rs and imported it into the repl. Commented out doc code to avoid it deleting my entire roc project (which happened)
This commit is contained in:
parent
22f77ed966
commit
807250f3e3
7 changed files with 324 additions and 321 deletions
|
@ -1,6 +1,6 @@
|
|||
use roc_cli::{build, build_app, repl, DIRECTORY_OR_FILES};
|
||||
use roc_cli::{build, docs, build_app, repl, DIRECTORY_OR_FILES};
|
||||
use std::io;
|
||||
use std::path::Path;
|
||||
use std::path::{Path, PathBuf};
|
||||
use target_lexicon::Triple;
|
||||
|
||||
fn main() -> io::Result<()> {
|
||||
|
@ -35,6 +35,21 @@ fn main() -> io::Result<()> {
|
|||
}
|
||||
}
|
||||
}
|
||||
Some("docs") => {
|
||||
let values = matches
|
||||
.subcommand_matches("docs")
|
||||
.unwrap()
|
||||
.values_of_os(DIRECTORY_OR_FILES)
|
||||
.unwrap();
|
||||
|
||||
let paths = values
|
||||
.map(|os_str| Path::new(os_str).to_path_buf())
|
||||
.collect::<Vec<PathBuf>>();
|
||||
|
||||
docs(paths);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue