forked from rojo-rbx/rojo
Modernize the doc subcommand
This commit is contained in:
@@ -12,7 +12,7 @@ fn run(global: GlobalOptions, subcommand: Subcommand) -> anyhow::Result<()> {
|
|||||||
Subcommand::Build(build_options) => cli::build(build_options)?,
|
Subcommand::Build(build_options) => cli::build(build_options)?,
|
||||||
Subcommand::Upload(upload_options) => cli::upload(upload_options)?,
|
Subcommand::Upload(upload_options) => cli::upload(upload_options)?,
|
||||||
Subcommand::FmtProject(subcommand) => subcommand.run()?,
|
Subcommand::FmtProject(subcommand) => subcommand.run()?,
|
||||||
Subcommand::Doc => cli::doc()?,
|
Subcommand::Doc(subcommand) => subcommand.run()?,
|
||||||
Subcommand::Plugin(plugin_options) => cli::plugin(plugin_options)?,
|
Subcommand::Plugin(plugin_options) => cli::plugin(plugin_options)?,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
pub fn doc() -> Result<(), anyhow::Error> {
|
use structopt::StructOpt;
|
||||||
opener::open("https://rojo.space/docs")?;
|
|
||||||
Ok(())
|
/// Open Rojo's documentation in your browser.
|
||||||
|
#[derive(Debug, StructOpt)]
|
||||||
|
pub struct DocCommand {}
|
||||||
|
|
||||||
|
impl DocCommand {
|
||||||
|
pub fn run(self) -> anyhow::Result<()> {
|
||||||
|
opener::open("https://rojo.space/docs")?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ use structopt::StructOpt;
|
|||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
pub use self::build::*;
|
pub use self::build::*;
|
||||||
pub use self::doc::*;
|
pub use self::doc::DocCommand;
|
||||||
pub use self::fmt_project::FmtProjectCommand;
|
pub use self::fmt_project::FmtProjectCommand;
|
||||||
pub use self::init::{InitCommand, InitKind};
|
pub use self::init::{InitCommand, InitKind};
|
||||||
pub use self::plugin::*;
|
pub use self::plugin::*;
|
||||||
@@ -114,9 +114,7 @@ pub enum Subcommand {
|
|||||||
Upload(UploadCommand),
|
Upload(UploadCommand),
|
||||||
|
|
||||||
FmtProject(FmtProjectCommand),
|
FmtProject(FmtProjectCommand),
|
||||||
|
Doc(DocCommand),
|
||||||
/// Open Rojo's documentation in your browser.
|
|
||||||
Doc,
|
|
||||||
|
|
||||||
/// Manages Rojo's Roblox Studio plugin.
|
/// Manages Rojo's Roblox Studio plugin.
|
||||||
Plugin(PluginCommand),
|
Plugin(PluginCommand),
|
||||||
|
|||||||
Reference in New Issue
Block a user