mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 13:21:38 +00:00
Add 'rojo doc' command
This commit is contained in:
parent
2a31937b81
commit
255bf439d3
6 changed files with 45 additions and 1 deletions
26
src/cli/doc.rs
Normal file
26
src/cli/doc.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
use opener::{open, OpenError};
|
||||
use snafu::Snafu;
|
||||
|
||||
#[derive(Debug, Snafu)]
|
||||
pub struct DocError(Error);
|
||||
|
||||
#[derive(Debug, Snafu)]
|
||||
enum Error {
|
||||
Open { source: OpenError },
|
||||
}
|
||||
|
||||
impl From<OpenError> for Error {
|
||||
fn from(source: OpenError) -> Self {
|
||||
Error::Open { source }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn doc() -> Result<(), DocError> {
|
||||
doc_inner()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn doc_inner() -> Result<(), Error> {
|
||||
open("https://rojo.space/docs")?;
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue