Skip to content

Commit 8436d04

Browse files
committed
feat: add contributing file
1 parent a53d992 commit 8436d04

1 file changed

Lines changed: 104 additions & 18 deletions

File tree

CONTRIBUTING.md

Lines changed: 104 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,110 @@
1-
# Contributing Guide
1+
# Contributing to Node Module Generator
22

3-
## How to Contribute
3+
First off, thank you for considering contributing to **Node Module Generator (NMG)**! It is people like you who make this tool a better resource for the entire Node.js community.
44

5-
1. Fork this repository
6-
2. Create your feature branch:
7-
git checkout -b feature/your-feature-name
8-
3. Commit your changes:
9-
git commit -m "feat: add new feature"
10-
4. Push to your branch
11-
5. Open a Pull Request
5+
Please take a moment to review this document to understand the contribution process.
126

13-
## Code Style
7+
---
148

15-
- Follow existing code structure
16-
- Use consistent naming conventions
17-
- Write clean and readable code
9+
## ⚖️ Code of Conduct
1810

19-
## Commit Convention
11+
By participating in this project, you agree to abide by our Code of Conduct. We expect all contributors to maintain a respectful, inclusive, and professional environment.
2012

21-
- feat: new feature
22-
- fix: bug fix
23-
- docs: documentation
24-
- refactor: code improvement
13+
---
14+
15+
## 🛠️ Getting Started
16+
17+
### Prerequisites
18+
- **Node.js**: v18.0.0 or higher
19+
- **NPM**, **Yarn**, or **PNPM**
20+
21+
### Development Setup
22+
1. Fork the repository on GitHub.
23+
2. Clone your fork locally:
24+
```bash
25+
git clone https://github.com/YOUR_USERNAME/node-module-generator.git
26+
cd node-module-generator
27+
```
28+
3. Install dependencies:
29+
```bash
30+
npm install
31+
```
32+
33+
### 🧪 Local Testing
34+
To test your changes locally, you can run the CLI directly from the source:
35+
```bash
36+
node bin/cli.js <command> <name>
37+
```
38+
39+
Alternatively, link it globally for local development:
40+
```bash
41+
npm link
42+
# Now you can use 'nmg' command locally
43+
```
44+
45+
---
46+
47+
## 📈 How to Contribute
48+
49+
### Reporting Bugs
50+
- Check the **Issues** tab to see if the bug has already been reported.
51+
- If not, open a new issue. Include a clear title, a description of the bug, steps to reproduce, and the expected vs. actual behavior.
52+
53+
### Proposing Features
54+
- Open an issue titled `feat: <Description>` to discuss the proposal before starting any implementation.
55+
56+
### Pull Request Process
57+
1. Create a new branch for your feature or fix:
58+
```bash
59+
git checkout -b feat/your-feature-name
60+
# OR
61+
git checkout -b fix/your-bug-name
62+
```
63+
2. Implement your changes. Ensure you adhere to **Clean Architecture** patterns.
64+
3. **Write Tests**: If you add a new feature or fix a bug, please include a test case.
65+
4. Run the full test suite:
66+
```bash
67+
npm test
68+
```
69+
5. Commit your changes using **Conventional Commits** (see below).
70+
6. Push to your fork and submit a Pull Request to the `main` branch.
71+
72+
---
73+
74+
## 📝 Coding Standards
75+
76+
- **Clean Architecture**: Maintain strict separation between Domain, Application, Infrastructure, and Interface layers.
77+
- **ESM/CJS**: New modules should follow the latest ESM templates.
78+
- **DRY & SOLID**: Write clean, modular, and reusable code.
79+
80+
---
81+
82+
## 🏷️ Commit Message Guidelines
83+
84+
We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification for our commit messages:
85+
86+
- `feat:`: A new feature for the user.
87+
- `fix:`: A bug fix for the user.
88+
- `docs:`: Documentation only changes.
89+
- `refactor:`: A code change that neither fixes a bug nor adds a feature.
90+
- `test:`: Adding missing tests or correcting existing tests.
91+
- `chore:`: Changes to the build process or auxiliary tools.
92+
93+
Example:
94+
```text
95+
feat(generator): add support for Zod schemas
96+
```
97+
98+
---
99+
100+
## ✅ Pull Request Checklist
101+
102+
Before submitting your PR, please ensure:
103+
1. [ ] The code follows the project's architecture and style.
104+
2. [ ] All tests pass locally (`npm test`).
105+
3. [ ] All status checks on GitHub (CI) pass.
106+
4. [ ] Documentation is updated if necessary.
107+
5. [ ] Commit messages follow the Conventional Commits standard.
108+
109+
---
110+
Thank you for your contribution! 🚀

0 commit comments

Comments
 (0)