mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 12:58:34 +00:00
refactor: renamed src/utils/text.rs to cli_styles
This commit is contained in:
@@ -18,8 +18,8 @@
|
||||
use crate::prelude::*;
|
||||
|
||||
use crate::core::{build_config::Config, deps::register};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, colored, printc};
|
||||
use crate::utils::fs::find_project_root;
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, colored, printc};
|
||||
use toml::{Value, map::Map};
|
||||
|
||||
/// Parsed arguments for the `dcr add` command.
|
||||
|
||||
@@ -28,8 +28,8 @@ use crate::utils::build::{
|
||||
get_config_opt, get_config_str, get_language_with_profile_or_default, get_string_with_profile,
|
||||
normalize_kind, resolve_artifact_target_dir, resolve_compiler,
|
||||
};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, BOLD_YELLOW, colored, printc};
|
||||
use crate::utils::fs::{canonicalize_path, find_project_root};
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, BOLD_YELLOW, colored, printc};
|
||||
use std::io::IsTerminal;
|
||||
use std::path::Path;
|
||||
use std::sync::{Arc, atomic::AtomicBool};
|
||||
|
||||
@@ -20,8 +20,8 @@ use crate::prelude::*;
|
||||
use crate::core::build_config::Config;
|
||||
use crate::core::workspace::parse_workspace;
|
||||
use crate::utils::build::{default_profile_flags, default_target_triple, parse_version_info};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, colored, printc};
|
||||
use crate::utils::fs::{check_dir, find_project_root, with_dir};
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, colored, printc};
|
||||
use glob::glob;
|
||||
use std::{fs, path::Path};
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, printc};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, printc};
|
||||
use serde::Deserialize;
|
||||
use std::fs;
|
||||
use std::io::Read;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, colored, printc};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, colored, printc};
|
||||
use glob::glob;
|
||||
use std::process::Command;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ use crate::utils::build::{
|
||||
use crate::utils::fs::{
|
||||
absolute_join, atomic_write, canonicalize_path, ensure_dcr_dir, find_project_root,
|
||||
};
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, printc};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, printc};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, printc};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, printc};
|
||||
|
||||
/// Displays the help information for the DCR CLI tool.
|
||||
///
|
||||
|
||||
@@ -21,7 +21,7 @@ use crate::config::FILE_MAIN_C;
|
||||
use crate::core::build_config::{Config, validate_package_name};
|
||||
use crate::core::vcs::VcsKind;
|
||||
use crate::utils::fs::check_dir;
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, colored, printc};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, colored, printc};
|
||||
use std::{fs, io::Write};
|
||||
|
||||
/// Initializes the current working directory as a new DCR project.
|
||||
|
||||
@@ -21,7 +21,7 @@ use crate::core::build::common;
|
||||
use crate::core::build_config::Config;
|
||||
use crate::utils::build::{get_bool_with_profile, get_list_with_profile};
|
||||
use crate::utils::fs::find_project_root;
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, BOLD_YELLOW, colored, printc};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, BOLD_YELLOW, colored, printc};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::Command;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ use crate::config::FILE_MAIN_C;
|
||||
use crate::core::build_config::{Config, validate_package_name};
|
||||
use crate::core::vcs::VcsKind;
|
||||
use crate::utils::fs::check_dir;
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, colored, printc};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, colored, printc};
|
||||
use std::{fs, io::Write};
|
||||
|
||||
/// Executes the `dcr new` command to scaffold a new C/C++ project directory structure.
|
||||
|
||||
@@ -23,7 +23,7 @@ use crate::core::build_config::Config;
|
||||
use crate::core::runner::run_binary;
|
||||
use crate::utils::build::{normalize_target_os, parse_version_info, substitute_vars};
|
||||
use crate::utils::fs::{find_project_root, with_dir};
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, colored, printc};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, colored, printc};
|
||||
use std::{path::Path, process::Command};
|
||||
|
||||
/// Retrieves the run command from the config, preferring target-specific,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, printc};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, printc};
|
||||
|
||||
/// Sets up DCR registries by loading the registry manager and printing the list of registries.
|
||||
pub fn setup(args: &[String]) -> i32 {
|
||||
|
||||
@@ -25,7 +25,7 @@ use crate::utils::build::{
|
||||
get_string_with_profile, resolve_compiler, resolve_pkg_config_flags,
|
||||
};
|
||||
use crate::utils::fs::{find_project_root, with_dir};
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, BOLD_RED, RESET, colored, printc};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, BOLD_RED, RESET, colored, printc};
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::Command;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
use crate::prelude::*;
|
||||
|
||||
use crate::core::build_config::Config;
|
||||
use crate::utils::text::{BOLD_CYAN, BOLD_GREEN, printc};
|
||||
use crate::utils::cli_styles::{BOLD_CYAN, BOLD_GREEN, printc};
|
||||
use std::collections::HashSet;
|
||||
use std::path::{Path, PathBuf};
|
||||
use toml::Value;
|
||||
|
||||
@@ -29,4 +29,4 @@ pub mod git;
|
||||
pub mod log;
|
||||
|
||||
/// Text processing and manipulation helpers.
|
||||
pub mod text;
|
||||
pub mod cli_styles;
|
||||
|
||||
Reference in New Issue
Block a user