aboutsummaryrefslogtreecommitdiff
path: root/mling/src/proj_mgr/generator.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-07-20 15:29:22 +0800
committer魏曹先生 <1992414357@qq.com>2026-07-20 15:29:22 +0800
commit62e323c80306d7dca68e47377a0ed6f4e146ba48 (patch)
tree0c6fe91d7197c83af52b08f793d12b0f01646d7d /mling/src/proj_mgr/generator.rs
parent33da7c8cb4f24caeef4e8127bc484bc9d236a0f3 (diff)
feat: remove deprecated mling scaffolding toolold-scaffolding-tool
The mling CLI tool is being rewritten, so remove all its source files, resources, and workspace membership to clean up the repository
Diffstat (limited to 'mling/src/proj_mgr/generator.rs')
-rw-r--r--mling/src/proj_mgr/generator.rs57
1 files changed, 0 insertions, 57 deletions
diff --git a/mling/src/proj_mgr/generator.rs b/mling/src/proj_mgr/generator.rs
deleted file mode 100644
index f1a6345..0000000
--- a/mling/src/proj_mgr/generator.rs
+++ /dev/null
@@ -1,57 +0,0 @@
-use std::path::{self, PathBuf};
-
-use mingling::{
- RenderResult, Routable,
- macros::{chain, pack, renderer, route},
-};
-use std::io::Write as _;
-
-use crate::{Next, proj_mgr::EntryGenerateProject, res::ResCurrentDir};
-
-pack!(StateGenerateProjectReady = PathBuf);
-pack!(ResultGenerateProjectChecklistCreated = PathBuf);
-
-pack!(StateGenerateProjectExecBegin = PathBuf);
-pack!(StateGenerateProjectExecuting = ());
-
-const CHECK_LIST_NAME: &str = "CHECKLIST.md";
-const CHECK_LIST_CONTENT: &str = include_str!("../../res/CHECKLIST.md");
-
-#[chain]
-pub fn handle_generate(_args: EntryGenerateProject, cwd: &ResCurrentDir) -> Next {
- let checklist_path = cwd.path.join(CHECK_LIST_NAME);
-
- if !checklist_path.exists() {
- StateGenerateProjectReady::new(checklist_path).to_chain()
- } else {
- StateGenerateProjectExecBegin::new(checklist_path).to_chain()
- }
-}
-
-#[chain]
-pub fn handle_state_gen_proj_ready(prev: StateGenerateProjectReady) -> Next {
- let path = prev.inner;
- route!(std::fs::write(&path, CHECK_LIST_CONTENT));
- ResultGenerateProjectChecklistCreated::new(path).to_render()
-}
-
-#[renderer]
-pub fn render_gen_proj_checklist_created(
- result: ResultGenerateProjectChecklistCreated,
-) -> RenderResult {
- let mut res = RenderResult::default();
- writeln!(
- res,
- "Successfully create {} at \"{}\"",
- CHECK_LIST_NAME,
- result.to_string_lossy()
- )
- .ok();
- writeln!(res).ok();
- writeln!(
- res,
- "Please fill in {CHECK_LIST_NAME} and run `mling gen` again to continue generating"
- )
- .ok();
- res
-}