diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-09 15:58:08 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-09 15:58:08 +0800 |
| commit | 596fd8efe269319d6585a7fd8731bef45180c0ea (patch) | |
| tree | 3469d0c5e6e0640263b0decd3419f333563b5b8b /mingling_cli | |
| parent | 4a72f075a83bf6aef24b553b06c784cbb283f648 (diff) | |
chore: remove obsolete 0.4 template files
Diffstat (limited to 'mingling_cli')
13 files changed, 0 insertions, 314 deletions
diff --git a/mingling_cli/tmpls/mingling_tmpl/0.4/checklist.toml b/mingling_cli/tmpls/mingling_tmpl/0.4/checklist.toml deleted file mode 100644 index 0a5d4a2..0000000 --- a/mingling_cli/tmpls/mingling_tmpl/0.4/checklist.toml +++ /dev/null @@ -1,63 +0,0 @@ -# --------------------------------------------------------------------------- # -# -# Mingling 0.4 Template -# -# > Welcome to Mingling. -# > Before starting your project, please fill out this `checklist` file, -# > as it will determine the structure of your project. -# -# --------------------------------------------------------------------------- # - -### 1. Please enter your program name: - -program_name = "my-cli" - -### 2. Please select the parser used in the project, - -# Clap Derive, the most mainstream option. -# When enabled, -# Mingling will use the struct implementing clap::Parser as the Entry Type -# ------------------ -# parser = "clap" -# ------------------ - -# Builtin, Mingling's built-in argument parser, lightweight, order-sensitive, suitable for simple parsing -# ------------------ -# parser = "builtin" -# ------------------ - -# Picker, based on `arg-picker`, a lightweight and type-safe argument parser that aligns better with Mingling's paradigm -# ------------------ -parser = "picker" -# ------------------ - -### 3. If you have async requirements, please select an async runtime -# Hint: You can only enable one of them -# ------------------ -# tokio = true -# async_std = true -# ------------------ - -### 4. If you need flexible management of your program's exit codes, enable this -# ------------------ -exit_code = true -# ------------------ - -### 5. If your project has completion needs, enable this -# ------------------ -completion = true -# ------------------ - -### 6. If you expect the number of commands to be > 20, -# enable the compile-time dispatch tree for faster matching -# ------------------ -# dispatch_tree = true -# ------------------ - -### 7. If you want the program to be able to output structured data controlled by flags such as `--json`, enable this -# ------------------ -# structural_renderer = true -# ------------------ - -### Final. All set. -# Please run `mling proj-init` in this directory to continue creating the project. diff --git a/mingling_cli/tmpls/mingling_tmpl/0.4/rule.toml b/mingling_cli/tmpls/mingling_tmpl/0.4/rule.toml deleted file mode 100644 index 0ff6ffb..0000000 --- a/mingling_cli/tmpls/mingling_tmpl/0.4/rule.toml +++ /dev/null @@ -1,95 +0,0 @@ -[[user.input]] -name = "program_name" - -[[user.toggle]] -name = "exit_code" - -[[user.toggle]] -name = "tokio" - -[[user.toggle]] -name = "async_std" - -[[user.toggle-mutex]] -mutex = [ "tokio", "async_std" ] -reason = "You can only select one async runtime" - -[[user.toggle]] -name = "completion" - -[[user.toggle]] -name = "pathf" -default = true - -[[user.toggle]] -name = "structural_renderer" - -[[user.toggle]] -name = "dispatch_tree" - -[[user.toggle]] -name = "use_parser" - -[[user.selection]] -name = "parser" -option = [ "clap", "builtin", "picker" ] - -[[user.toggle-mutex]] -mutex = [ "clap", "builtin", "picker" ] -reason = "You can only select one argument parser" - -[[display]] -name = "ASYNC_STD" -rule = "async_std" - -[[display]] -name = "TOKIO" -rule = "tokio" - -[[display]] -name = "ASYNC" -rule = "tokio || async_std" - -[[display]] -name = "BUILD_TIME" -rule = "completion || pathf" - -[[hide-file]] -file = "./build.rs" -rule = "!completion && !pathf" - -[[display]] -name = "PARSER_CLAP" -rule = "use_parser && parser == clap" - -[[display]] -name = "PARSER_BUILTIN" -rule = "use_parser && parser == builtin" - -[[display]] -name = "PARSER_PICKER" -rule = "use_parser && parser == picker" - -[[display]] -name = "COMPLETION" -rule = "completion" - -[[display]] -name = "STRUCTURAL_RENDERER" -rule = "structural_renderer" - -[[display]] -name = "EXIT_CODE" -rule = "exit_code" - -[[display]] -name = "DISPATCH_TREE" -rule = "dispatch_tree" - -[[display]] -name = "NOT_DISPATCH_TREE" -rule = "!dispatch_tree" - -[[display]] -name = "PATHF" -rule = "pathf" diff --git a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.gitignore b/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.gitignore deleted file mode 100644 index ea8c4bf..0000000 --- a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_command/class.toml b/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_command/class.toml deleted file mode 100644 index e69de29..0000000 --- a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_command/class.toml +++ /dev/null diff --git a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_completion/class.toml b/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_completion/class.toml deleted file mode 100644 index e69de29..0000000 --- a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_completion/class.toml +++ /dev/null diff --git a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_help/class.toml b/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_help/class.toml deleted file mode 100644 index e69de29..0000000 --- a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_help/class.toml +++ /dev/null diff --git a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_outside_type/class.toml b/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_outside_type/class.toml deleted file mode 100644 index e69de29..0000000 --- a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_outside_type/class.toml +++ /dev/null diff --git a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_resource/class.toml b/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_resource/class.toml deleted file mode 100644 index e69de29..0000000 --- a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_resource/class.toml +++ /dev/null diff --git a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_setup/class.toml b/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_setup/class.toml deleted file mode 100644 index e69de29..0000000 --- a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_setup/class.toml +++ /dev/null diff --git a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_setup_hook/class.toml b/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_setup_hook/class.toml deleted file mode 100644 index e69de29..0000000 --- a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_.mling/tmpl_setup_hook/class.toml +++ /dev/null diff --git a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_Cargo.toml b/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_Cargo.toml deleted file mode 100644 index 2345911..0000000 --- a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_Cargo.toml +++ /dev/null @@ -1,79 +0,0 @@ -[package] -name = "<<<program_name>>>" -version = "0.1.0" -edition = "2024" - -[[bin]] -name = "<<<program_name>>>" -path = "src/main.rs" - -[profile.dev] -opt-level = 0 -debug = true -panic = "unwind" -lto = false - -[profile.release] -opt-level = 3 -# If you need to use exec_panic hook, enable `unwind` -# panic = "unwind" -panic = "abort" -lto = true - -[dependencies.mingling] -version = "0.4" -features = [ - "extras", -??? >>> ASYNC - "async", -??? <<< -??? >>> PARSER_PICKER - "picker", -??? <<< -??? >>> PARSER_CLAP - "clap", -??? <<< -??? >>> PARSER_BUILTIN - "parser", -??? <<< -??? >>> DISPATCH_TREE - "dispatch_tree", -??? <<< -??? >>> PATHF - "pathf", -??? <<< -??? >>> COMPLETION - "comp", -??? <<< -??? >>> STRUCTURAL_RENDERER - "structural_renderer", -??? <<< -] - -??? >>> BUILD_TIME -[build-dependencies.mingling] -version = "0.4" -features = [ - "build", -??? >>> DISPATCH_TREE - "dispatch_tree", -??? <<< -??? >>> PATHF - "pathf", -??? <<< -??? >>> COMPLETION - "comp", -??? <<< -] -??? <<< - -[dependencies] -??? >>> PARSER_CLAP -clap = { version = "4", features = [ "derive" ] } -??? <<< -??? >>> TOKIO -tokio = { version = "1", features = [ "full" ] } -??? <<< -??? >>> ASYNC_STD -async-std = "1" -??? <<< diff --git a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_build.rs b/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_build.rs deleted file mode 100644 index e90070c..0000000 --- a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_build.rs +++ /dev/null @@ -1,31 +0,0 @@ -fn main() { -??? >>> COMPLETION - build_scripts(); -??? <<< -??? >>> PATHF - build_pathf_mapping(); -??? <<< -} -??? >>> COMPLETION - -/// Generate completion scripts -fn build_scripts() { - // `env!("CARGO_PKG_NAME")` equals the crate name, which matches the binary name. - // If your binary name differs from the crate name, specify it explicitly. - mingling::build::build_comp_scripts( - // Your binary name: - env!("CARGO_PKG_NAME"), - ) - .unwrap(); -} -??? <<< -??? >>> PATHF - -/// Use `pathf` to analyze the workspace's mingling macro calls -/// and generate type path mappings for them -fn build_pathf_mapping() { - // Build pathf type mapping to ensure that the enabled `pathf` feature - // can correctly scan macros in the project - mingling::build::analyze_and_build_type_mapping().unwrap(); -} -??? <<< diff --git a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_src/tmpl_main.rs b/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_src/tmpl_main.rs deleted file mode 100644 index 02f3cc9..0000000 --- a/mingling_cli/tmpls/mingling_tmpl/0.4/tmpl_src/tmpl_main.rs +++ /dev/null @@ -1,45 +0,0 @@ -pub(crate) mod commands; -pub(crate) mod helps; -pub(crate) mod renderers; - -use mingling::macros::buffer; -use mingling::prelude::*; -??? >>> EXIT_CODE -use mingling::setup::ExitCodeSetup; -??? <<< -use mingling::setup::picker::BasicProgramSetup; - -fn main() { - let mut program = ThisProgram::new(); - - // Plugins - program.with_setup(BasicProgramSetup); -??? >>> EXIT_CODE - program.with_setup(ExitCodeSetup::default()); -??? <<< -??? >>> COMPLETION - - // Completion Dispatcher - program.with_dispatcher(CMDCompletion); -??? <<< -??? >>> NOT_DISPATCH_TREE - - // Dispatchers - program.with_dispatcher(commands::greet::CMDGreet); -??? <<< - - program.exec_and_exit(); -} - -#[renderer(buffer)] -fn handle_error_dispatcher_not_found(prev: ErrorDispatcherNotFound) { - r_println!("Error: cannot match \"{}\" to any command", prev.join(" ")); -} - -#[renderer(buffer)] -fn handle_error_renderer_not_found(prev: ErrorRendererNotFound) { - let type_name = prev.inner; - r_println!("Error: renderer not found for \"{}\"", type_name); -} - -gen_program!(); |
