From 3ce42cc8db15d1ee965f0b737c40b4a20b747ce2 Mon Sep 17 00:00:00 2001 From: portersky <24420859+portersky@users.noreply.github.com> Date: Mon, 15 Jun 2026 04:33:55 +0200 Subject: [PATCH] chore: add gitattributes, rename guide, and template comments Add .gitattributes enforcing LF line endings. Add a rename guide to README.md for scaffolding new projects. Comment main.c as a template placeholder to replace. --- .gitattributes | 1 + README.md | 16 +++++++++++++++- main.c | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/README.md b/README.md index 05abe6d..f528d72 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,21 @@ Linux / macOS: ./build/main ``` -## Adding a new module (TDD workflow) +## Renaming the Project + +To use this template for a new project, rename `ctdd` to your project +name: + +1. Rename the `ctdd/` directory to `/`. +2. Replace `ctdd` with `` in: + - `CMakeLists.txt` (project name, `target_link_libraries`) + - `ctdd/CMakeLists.txt` (library names) + - All source `#include` directives + - `tests/CMakeLists.txt` (library references) +3. Update the `project()` call in `CMakeLists.txt`. +4. Update `main.c` to include your new headers. + +Example: `ctdd/` becomes `mylib/`, `ctdd_str` becomes `mylib_str`. ### 1. Write the header diff --git a/main.c b/main.c index 03f1a18..e9c453b 100644 --- a/main.c +++ b/main.c @@ -1,3 +1,6 @@ +// Template placeholder — replace with your own entry point. +// Remove or rename this file when scaffolding a new project. + #include "ctdd/str.h" #include "ctdd/report.h" #include "ctdd/logger.h"