From 43ad07b97d7080a8fc621e303e0ccdf769bbc6a5 Mon Sep 17 00:00:00 2001 From: Leynos Date: Sat, 19 Jul 2025 03:41:48 +0100 Subject: [PATCH 1/2] Fix CLI snippet formatting --- docs/netsuke-design.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/netsuke-design.md b/docs/netsuke-design.md index 7ee9b542..b900882c 100644 --- a/docs/netsuke-design.md +++ b/docs/netsuke-design.md @@ -1217,7 +1217,8 @@ use std::path::PathBuf; #[derive(Parser)] #[command(author, version, about, long_about = None)] -struct Cli { /// Path to the Netsuke manifest file to use. +struct Cli { + /// Path to the Netsuke manifest file to use. #[arg(short, long, value_name = "FILE", default_value = "Netsukefile")] file: PathBuf, @@ -1230,14 +1231,19 @@ struct Cli { /// Path to the Netsuke manifest file to use. jobs: Option, #[command(subcommand)] - command: Option, } + command: Option, +} #[derive(Subcommand)] -enum Commands { /// Build specified targets (or default targets if none are -given) [default]. Build { /// A list of specific targets to build. targets: -Vec, }, - - /// Remove build artifacts and intermediate files. Clean {}, +enum Commands { + /// Build specified targets (or default targets if none are given) [default]. + Build { + /// A list of specific targets to build. + targets: Vec, + }, + + /// Remove build artifacts and intermediate files. + Clean {}, /// Display the build dependency graph in DOT format for visualization. Graph {}, From f7312c1c793759b0a2e772dad237f1af7446e5c4 Mon Sep 17 00:00:00 2001 From: Leynos Date: Sat, 19 Jul 2025 17:45:16 +0100 Subject: [PATCH 2/2] Fix CLI docs formatting --- README.md | 11 +++++------ docs/netsuke-design.md | 24 ++++++++---------------- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 5a6cddf4..b24641c6 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,13 @@ # 🧵 Netsuke -A modern, declarative build system compiler. -YAML + Jinja in, Ninja out. Nothing more. Nothing less. +A modern, declarative build system compiler. YAML + Jinja in, Ninja out. +Nothing more. Nothing less. ## What is Netsuke? **Netsuke** is a friendly build system that compiles structured manifests into -a Ninja build graph. -It’s not a shell-script runner, a meta-task framework, or a domain-specific CI -layer. It’s `make`, if `make` hadn’t been invented in 1977. +a Ninja build graph. It’s not a shell-script runner, a meta-task framework, or +a domain-specific CI layer. It’s `make`, if `make` hadn’t been invented in 1977. ### Key properties @@ -48,7 +47,7 @@ targets: - name: app rule: link sources: "{{ glob('src/*.c') | map('basename') | map('with_suffix', '.o') }}" -```` +``` Yes, it’s just YAML. Yes, that’s a Jinja `foreach`. No, you don’t need to define `.PHONY` or remember what `$@` means. This is 2025. You deserve better. diff --git a/docs/netsuke-design.md b/docs/netsuke-design.md index b900882c..8bf58073 100644 --- a/docs/netsuke-design.md +++ b/docs/netsuke-design.md @@ -1217,8 +1217,7 @@ use std::path::PathBuf; #[derive(Parser)] #[command(author, version, about, long_about = None)] -struct Cli { - /// Path to the Netsuke manifest file to use. +struct Cli { /// Path to the Netsuke manifest file to use. #[arg(short, long, value_name = "FILE", default_value = "Netsukefile")] file: PathBuf, @@ -1231,22 +1230,15 @@ struct Cli { jobs: Option, #[command(subcommand)] - command: Option, -} + command: Option, } #[derive(Subcommand)] -enum Commands { - /// Build specified targets (or default targets if none are given) [default]. - Build { - /// A list of specific targets to build. - targets: Vec, - }, - - /// Remove build artifacts and intermediate files. - Clean {}, - - /// Display the build dependency graph in DOT format for visualization. - Graph {}, +enum Commands { /// Build specified targets (or default targets if none are +given) [default]. Build { /// A list of specific targets to build. targets: +Vec, }, + + /// Remove build artefacts and intermediate files. Clean {}, /// Display + the build dependency graph in DOT format for visualisation. Graph {}, } ``` *Note: The* `Build` *command is wrapped in an* `Option` *and will be