mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
Update README and CLI clone command for Atlas
- Changed project name from Rojo to Atlas in the README, reflecting the new branding. - Expanded the README with detailed installation instructions, features, and CLI commands for Atlas. - Added functionality in the CLI clone command to change the current working directory to the specified path after cloning. These updates aim to improve documentation clarity and enhance user experience with the Atlas tool.
This commit is contained in:
parent
5a6a8d0b3d
commit
c47e568cd4
3 changed files with 276 additions and 29 deletions
|
|
@ -36,6 +36,10 @@ pub struct CloneCommand {
|
|||
/// Skip cloning cursor rules into .cursor directory.
|
||||
#[clap(long)]
|
||||
pub skip_rules: bool,
|
||||
|
||||
/// Skip changing the working directory into the project after creation.
|
||||
#[clap(long)]
|
||||
pub skip_cd: bool,
|
||||
}
|
||||
|
||||
impl CloneCommand {
|
||||
|
|
@ -72,6 +76,7 @@ impl CloneCommand {
|
|||
skip_git,
|
||||
placeid: Some(self.placeid),
|
||||
skip_rules: self.skip_rules,
|
||||
skip_cd: true,
|
||||
};
|
||||
|
||||
init.run()?;
|
||||
|
|
@ -111,6 +116,11 @@ impl CloneCommand {
|
|||
.status();
|
||||
}
|
||||
|
||||
if !self.skip_cd {
|
||||
std::env::set_current_dir(&path)
|
||||
.with_context(|| format!("Failed to cd into {}", path.display()))?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use std::{
|
|||
io::{self, Write},
|
||||
};
|
||||
|
||||
use anyhow::{bail, format_err};
|
||||
use anyhow::{bail, format_err, Context};
|
||||
use clap::Parser;
|
||||
use fs_err as fs;
|
||||
use fs_err::OpenOptions;
|
||||
|
|
@ -45,6 +45,10 @@ pub struct InitCommand {
|
|||
/// Skip cloning cursor rules into .cursor directory.
|
||||
#[clap(long)]
|
||||
pub skip_rules: bool,
|
||||
|
||||
/// Skip changing the working directory into the project after creation.
|
||||
#[clap(skip)]
|
||||
pub skip_cd: bool,
|
||||
}
|
||||
|
||||
impl InitCommand {
|
||||
|
|
@ -206,8 +210,9 @@ impl InitCommand {
|
|||
|
||||
println!("Created project successfully.");
|
||||
|
||||
if self.placeid.is_some() {
|
||||
println!("Run 'atlas syncback' to sync your place.");
|
||||
if !self.skip_cd {
|
||||
std::env::set_current_dir(&base_path)
|
||||
.with_context(|| format!("Failed to cd into {}", base_path.display()))?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue