Skip to content

Commit ce12448

Browse files
docs (package): add documentations and license (WebDevCaptain-Lab#17)
add documentations and templates for creating issues and pull requests
1 parent 3dfce4c commit ce12448

File tree

9 files changed

+406
-0
lines changed

9 files changed

+406
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Contributing to Mathy
2+
3+
Thank you for considering contributing to **Mathy**! We welcome all contributions to make this project better. Here's how you can help:
4+
5+
---
6+
7+
## Getting Started
8+
9+
1. **Fork the Repository**:
10+
11+
- Click the "Fork" button on the top-right corner of the repository page.
12+
13+
2. **Clone Your Fork**:
14+
15+
```bash
16+
git clone https://github.com/WebDevCaptain-Lab/oss-npm-package-workshop.git
17+
cd oss-npm-package-workshop
18+
```
19+
20+
3. **Install Dependencies**:
21+
22+
```bash
23+
npm install
24+
```
25+
26+
4. **Run Tests**:
27+
```bash
28+
npm test
29+
```
30+
31+
---
32+
33+
## How to Contribute
34+
35+
### Reporting Issues
36+
37+
Found a bug or have a suggestion? Open an issue and use the appropriate template.
38+
39+
### Feature Requests
40+
41+
Check the [Roadmap](./ROADMAP.md) to see if your feature aligns with future plans. If not, create an issue to discuss.
42+
43+
### Submitting Pull Requests
44+
45+
- Create a new branch for your work:
46+
`git checkout -b my-feature`
47+
48+
- Make your changes. Write clear and concise code, and add comments if necessary.
49+
50+
- Ensure tests pass:
51+
`npm test`
52+
53+
- Push your branch and open a pull request:
54+
`git push origin my-feature`
55+
56+
- Follow the Pull Request Template to include all required details.
57+
58+
- Code Style
59+
Prettier and ESLint are used to enforce code style. Run:
60+
61+
- `npm run lint`
62+
- `npm run format`
63+
64+
- Join the Discussion
65+
Feel free to ask questions or seek guidance by opening a discussion or issue. Happy coding!
66+
67+
---
68+
69+
### **2. CODE_OF_CONDUCT.md**
70+
71+
Defines behavior expectations for contributors.
72+
73+
```markdown
74+
# Contributor Code of Conduct
75+
76+
## Our Pledge
77+
78+
We as contributors and maintainers pledge to make participation in this project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
79+
80+
## Our Standards
81+
82+
Examples of behavior that contributes to a positive environment:
83+
84+
- Being respectful of differing viewpoints.
85+
- Providing constructive feedback.
86+
- Showing empathy toward others.
87+
88+
Examples of unacceptable behavior:
89+
90+
- Use of sexualized language or unwelcome advances.
91+
- Insulting or derogatory comments.
92+
- Public or private harassment.
93+
94+
## Enforcement
95+
96+
Instances of unacceptable behavior can be reported by contacting the project team at **[[email protected]](mailto:[email protected])**. All complaints will be reviewed and addressed confidentially.
97+
98+
## Acknowledgments
99+
100+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org).
101+
```

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: "Bug Report"
2+
description: "Report a bug in Mathy Lib."
3+
title: "[Bug]: <Brief Description>"
4+
labels: [bug]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for reporting a bug! Please fill out the form below so we can resolve the issue promptly.
10+
11+
- type: input
12+
id: summary
13+
attributes:
14+
label: "Bug Summary"
15+
description: "Provide a concise summary of the bug."
16+
placeholder: "e.g., add function returns wrong result for negative numbers."
17+
18+
- type: textarea
19+
id: steps
20+
attributes:
21+
label: "Steps to Reproduce"
22+
description: "Provide the steps to reproduce the bug."
23+
placeholder: |
24+
1. Call `add(-1, -1)`
25+
2. Check the output
26+
3. Observe the issue
27+
28+
- type: textarea
29+
id: expected
30+
attributes:
31+
label: "Expected Behavior"
32+
description: "What should happen instead?"
33+
placeholder: "The `add` function should return -2."
34+
35+
- type: textarea
36+
id: actual
37+
attributes:
38+
label: "Actual Behavior"
39+
description: "What actually happened?"
40+
placeholder: "The `add` function returned 0."
41+
42+
- type: input
43+
id: environment
44+
attributes:
45+
label: "Environment Details"
46+
description: "Provide relevant details about your setup."
47+
placeholder: "OS: macOS 13, Node.js: 18.12.0, Mathy Lib version: 1.0.1"
48+
49+
- type: textarea
50+
id: additional
51+
attributes:
52+
label: "Additional Context"
53+
description: "Add any other relevant information or screenshots."
54+
placeholder: "Include error logs, screenshots, or related details."
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "Feature Request"
2+
description: "Suggest a new feature or enhancement for Mathy Lib."
3+
title: "[Feature]: <Brief Description>"
4+
labels: [enhancement]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
We'd love to hear your ideas for improving Mathy Lib! Please fill out the form below.
10+
11+
- type: input
12+
id: feature_summary
13+
attributes:
14+
label: "Feature Summary"
15+
description: "Briefly describe the new feature or enhancement."
16+
placeholder: "e.g., Add a function for subtracting numbers."
17+
18+
- type: textarea
19+
id: description
20+
attributes:
21+
label: "Description"
22+
description: "Provide a detailed explanation of the feature."
23+
placeholder: "The subtract function should return the difference of two numbers."
24+
25+
- type: textarea
26+
id: use_cases
27+
attributes:
28+
label: "Use Cases"
29+
description: "Describe how this feature would be used."
30+
placeholder: "This function will be used to perform simple subtraction operations."
31+
32+
- type: textarea
33+
id: alternatives
34+
attributes:
35+
label: "Alternatives"
36+
description: "List any alternative solutions or features you've considered."
37+
placeholder: "Using external libraries for subtraction, but it's not ideal for our lightweight library."
38+
39+
- type: textarea
40+
id: additional
41+
attributes:
42+
label: "Additional Context"
43+
description: "Add any other relevant information or screenshots."
44+
placeholder: "Provide examples, links, or other supporting details."

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Question or Support"
2+
description: "Ask a question or request support for Mathy Lib."
3+
title: "[Question]: <Your Question>"
4+
labels: [question]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Have a question or need help? Let us know by filling out the form below.
10+
11+
- type: input
12+
id: question_summary
13+
attributes:
14+
label: "Question Summary"
15+
description: "What is your question?"
16+
placeholder: "e.g., How do I use the multiply function?"
17+
18+
- type: textarea
19+
id: details
20+
attributes:
21+
label: "Details"
22+
description: "Provide additional details about your question or problem."
23+
placeholder: "Include code examples, error logs, or other details."
24+
25+
- type: textarea
26+
id: additional
27+
attributes:
28+
label: "Additional Context"
29+
description: "Add any other relevant information."
30+
placeholder: "Screenshots, links to documentation, etc."

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!-- Please ensure your PR follows these guidelines -->
2+
3+
### Description
4+
5+
<!-- A clear and concise description of what this PR does. -->
6+
7+
### Related Issues
8+
9+
<!-- List any related issues or feature requests here, using the "Closes #<issue_number>" or "Fixes #<issue_number>" syntax. -->
10+
11+
Closes #123
12+
13+
### Type of change
14+
15+
- [ ] Bug fix
16+
- [ ] New feature
17+
- [ ] Refactor
18+
- [ ] Documentation update
19+
- [ ] Other (please specify):
20+
21+
### Checklist
22+
23+
- [ ] My code follows the project's coding style.
24+
- [ ] I have performed a self-review of my code.
25+
- [ ] I have written or updated tests to cover my changes.
26+
- [ ] I have updated documentation (if necessary).
27+
- [ ] My changes generate no new warnings.
28+
29+
### Screenshots (if applicable)
30+
31+
<!-- Include relevant screenshots to highlight changes. -->
32+
33+
### Additional context
34+
35+
<!-- Add any other relevant information about this PR. -->

.github/ROADMAP.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Mathy Roadmap
2+
3+
Our goal is to make **Mathy** a comprehensive and lightweight library for performing basic mathematical operations. Here are our plans:
4+
5+
---
6+
7+
## Current Features
8+
9+
- **Addition**: Adds multiple numbers.
10+
11+
---
12+
13+
## Future Features
14+
15+
1. **Subtraction**:
16+
17+
- Function to subtract one number from another.
18+
- Example: `subtract(5, 3) // 2`.
19+
20+
2. **Division**:
21+
22+
- Function to divide one number by another.
23+
- Example: `divide(6, 2) // 3`.
24+
25+
3. **Advanced Operations**:
26+
- Support for percentages.
27+
- Modular arithmetic.
28+
29+
---
30+
31+
## Long-Term Vision
32+
33+
- Ensure compatibility with various JavaScript frameworks.
34+
- Optimize performance for large datasets.
35+
- Provide thorough documentation and examples.
36+
37+
---
38+
39+
Want to contribute to this roadmap? See our [Contributing Guide](./CONTRIBUTING.md) for details!

.github/SUPPORT.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Support Guide
2+
3+
If you need help with **Mathy**, here’s how to get assistance:
4+
5+
---
6+
7+
## Questions and Discussions
8+
9+
- Open a [Discussion](https://github.com/WebDevCaptain-Lab/oss-npm-package-workshop.git/discussions) to ask a question or seek advice.
10+
11+
## Reporting Bugs
12+
13+
- Found a bug? [Open an Issue](https://github.com/WebDevCaptain-Lab/oss-npm-package-workshop.git/issues/new?template=bug_report.yml) using the Bug Report template.
14+
15+
## Feature Requests
16+
17+
- Have an idea for improving Math-Lib? Submit a [Feature Request](https://github.com/WebDevCaptain-Lab/oss-npm-package-workshop.git/issues/new?template=feature_request.yml).
18+
19+
## Frequently Asked Questions (FAQ)
20+
21+
1. **How do I install Mathy?**
22+
23+
- Use npm: `npm install mathy`.
24+
25+
2. **What versions of Node.js are supported?**
26+
- We support Node.js versions >=20.
27+
28+
---
29+
30+
## Contact Us
31+
32+
If your query is not addressed above, email us at **[[email protected]](mailto:[email protected])**.
33+
34+
Please be patient as our team is small, but we’ll do our best to respond promptly.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) [2025] [Shreyash (WebDevcaptain)]
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)