Skip to content

Commit

Permalink
docs: improve new module creation guide in CONTRIBUTING.md
Browse files Browse the repository at this point in the history
Signed-off-by: suin <[email protected]>
  • Loading branch information
suin committed Dec 12, 2024
1 parent 46cd441 commit 8c6a372
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,21 @@ This project and everyone participating in it is governed by our [Code of Conduc

## Adding a New Module

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

## Testing

Expand Down

0 comments on commit 8c6a372

Please sign in to comment.