Skip to content

Commit 8c6a372

Browse files
committed
docs: improve new module creation guide in CONTRIBUTING.md
Signed-off-by: suin <[email protected]>
1 parent 46cd441 commit 8c6a372

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,21 @@ This project and everyone participating in it is governed by our [Code of Conduc
4545

4646
## Adding a New Module
4747

48-
1. Create a new directory for your module
49-
2. Include:
50-
- README.md with documentation
51-
- kcl.mod file
52-
- Source code files
53-
- Test files
54-
3. Update the top-level README.md to include your module
48+
1. Create a new directory for your module:
49+
```bash
50+
mkdir <module_name>
51+
cd <module_name>
52+
kcl mod init
53+
```
54+
Note: Choose a descriptive name for your module using snake_case format (e.g., `string_utils`, `http_client`).
55+
2. Implement your module with the following structure:
56+
- Source code files (`.k` extension)
57+
- Test files (with `_test.k` suffix)
58+
- `README.md` with comprehensive documentation
59+
- `kcl.mod` file for module configuration
60+
3. Add your module to the main project:
61+
- Update the top-level `README.md` to include your module
62+
- Ensure all documentation is clear and complete
5563

5664
## Testing
5765

0 commit comments

Comments
 (0)