forked from WebDevCaptain-Lab/oss-npm-package-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs (package): add documentations and license (WebDevCaptain-Lab#17)
add documentations and templates for creating issues and pull requests
- Loading branch information
1 parent
3dfce4c
commit ce12448
Showing
9 changed files
with
406 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# Contributing to Mathy | ||
|
||
Thank you for considering contributing to **Mathy**! We welcome all contributions to make this project better. Here's how you can help: | ||
|
||
--- | ||
|
||
## Getting Started | ||
|
||
1. **Fork the Repository**: | ||
|
||
- Click the "Fork" button on the top-right corner of the repository page. | ||
|
||
2. **Clone Your Fork**: | ||
|
||
```bash | ||
git clone https://github.com/WebDevCaptain-Lab/oss-npm-package-workshop.git | ||
cd oss-npm-package-workshop | ||
``` | ||
|
||
3. **Install Dependencies**: | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
4. **Run Tests**: | ||
```bash | ||
npm test | ||
``` | ||
|
||
--- | ||
|
||
## How to Contribute | ||
|
||
### Reporting Issues | ||
|
||
Found a bug or have a suggestion? Open an issue and use the appropriate template. | ||
|
||
### Feature Requests | ||
|
||
Check the [Roadmap](./ROADMAP.md) to see if your feature aligns with future plans. If not, create an issue to discuss. | ||
|
||
### Submitting Pull Requests | ||
|
||
- Create a new branch for your work: | ||
`git checkout -b my-feature` | ||
|
||
- Make your changes. Write clear and concise code, and add comments if necessary. | ||
|
||
- Ensure tests pass: | ||
`npm test` | ||
|
||
- Push your branch and open a pull request: | ||
`git push origin my-feature` | ||
|
||
- Follow the Pull Request Template to include all required details. | ||
|
||
- Code Style | ||
Prettier and ESLint are used to enforce code style. Run: | ||
|
||
- `npm run lint` | ||
- `npm run format` | ||
|
||
- Join the Discussion | ||
Feel free to ask questions or seek guidance by opening a discussion or issue. Happy coding! | ||
|
||
--- | ||
|
||
### **2. CODE_OF_CONDUCT.md** | ||
|
||
Defines behavior expectations for contributors. | ||
|
||
```markdown | ||
# Contributor Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
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. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment: | ||
|
||
- Being respectful of differing viewpoints. | ||
- Providing constructive feedback. | ||
- Showing empathy toward others. | ||
|
||
Examples of unacceptable behavior: | ||
|
||
- Use of sexualized language or unwelcome advances. | ||
- Insulting or derogatory comments. | ||
- Public or private harassment. | ||
|
||
## Enforcement | ||
|
||
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. | ||
|
||
## Acknowledgments | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org). | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: "Bug Report" | ||
description: "Report a bug in Mathy Lib." | ||
title: "[Bug]: <Brief Description>" | ||
labels: [bug] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thank you for reporting a bug! Please fill out the form below so we can resolve the issue promptly. | ||
- type: input | ||
id: summary | ||
attributes: | ||
label: "Bug Summary" | ||
description: "Provide a concise summary of the bug." | ||
placeholder: "e.g., add function returns wrong result for negative numbers." | ||
|
||
- type: textarea | ||
id: steps | ||
attributes: | ||
label: "Steps to Reproduce" | ||
description: "Provide the steps to reproduce the bug." | ||
placeholder: | | ||
1. Call `add(-1, -1)` | ||
2. Check the output | ||
3. Observe the issue | ||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: "Expected Behavior" | ||
description: "What should happen instead?" | ||
placeholder: "The `add` function should return -2." | ||
|
||
- type: textarea | ||
id: actual | ||
attributes: | ||
label: "Actual Behavior" | ||
description: "What actually happened?" | ||
placeholder: "The `add` function returned 0." | ||
|
||
- type: input | ||
id: environment | ||
attributes: | ||
label: "Environment Details" | ||
description: "Provide relevant details about your setup." | ||
placeholder: "OS: macOS 13, Node.js: 18.12.0, Mathy Lib version: 1.0.1" | ||
|
||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: "Additional Context" | ||
description: "Add any other relevant information or screenshots." | ||
placeholder: "Include error logs, screenshots, or related details." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: "Feature Request" | ||
description: "Suggest a new feature or enhancement for Mathy Lib." | ||
title: "[Feature]: <Brief Description>" | ||
labels: [enhancement] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
We'd love to hear your ideas for improving Mathy Lib! Please fill out the form below. | ||
- type: input | ||
id: feature_summary | ||
attributes: | ||
label: "Feature Summary" | ||
description: "Briefly describe the new feature or enhancement." | ||
placeholder: "e.g., Add a function for subtracting numbers." | ||
|
||
- type: textarea | ||
id: description | ||
attributes: | ||
label: "Description" | ||
description: "Provide a detailed explanation of the feature." | ||
placeholder: "The subtract function should return the difference of two numbers." | ||
|
||
- type: textarea | ||
id: use_cases | ||
attributes: | ||
label: "Use Cases" | ||
description: "Describe how this feature would be used." | ||
placeholder: "This function will be used to perform simple subtraction operations." | ||
|
||
- type: textarea | ||
id: alternatives | ||
attributes: | ||
label: "Alternatives" | ||
description: "List any alternative solutions or features you've considered." | ||
placeholder: "Using external libraries for subtraction, but it's not ideal for our lightweight library." | ||
|
||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: "Additional Context" | ||
description: "Add any other relevant information or screenshots." | ||
placeholder: "Provide examples, links, or other supporting details." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: "Question or Support" | ||
description: "Ask a question or request support for Mathy Lib." | ||
title: "[Question]: <Your Question>" | ||
labels: [question] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Have a question or need help? Let us know by filling out the form below. | ||
- type: input | ||
id: question_summary | ||
attributes: | ||
label: "Question Summary" | ||
description: "What is your question?" | ||
placeholder: "e.g., How do I use the multiply function?" | ||
|
||
- type: textarea | ||
id: details | ||
attributes: | ||
label: "Details" | ||
description: "Provide additional details about your question or problem." | ||
placeholder: "Include code examples, error logs, or other details." | ||
|
||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: "Additional Context" | ||
description: "Add any other relevant information." | ||
placeholder: "Screenshots, links to documentation, etc." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- Please ensure your PR follows these guidelines --> | ||
|
||
### Description | ||
|
||
<!-- A clear and concise description of what this PR does. --> | ||
|
||
### Related Issues | ||
|
||
<!-- List any related issues or feature requests here, using the "Closes #<issue_number>" or "Fixes #<issue_number>" syntax. --> | ||
|
||
Closes #123 | ||
|
||
### Type of change | ||
|
||
- [ ] Bug fix | ||
- [ ] New feature | ||
- [ ] Refactor | ||
- [ ] Documentation update | ||
- [ ] Other (please specify): | ||
|
||
### Checklist | ||
|
||
- [ ] My code follows the project's coding style. | ||
- [ ] I have performed a self-review of my code. | ||
- [ ] I have written or updated tests to cover my changes. | ||
- [ ] I have updated documentation (if necessary). | ||
- [ ] My changes generate no new warnings. | ||
|
||
### Screenshots (if applicable) | ||
|
||
<!-- Include relevant screenshots to highlight changes. --> | ||
|
||
### Additional context | ||
|
||
<!-- Add any other relevant information about this PR. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Mathy Roadmap | ||
|
||
Our goal is to make **Mathy** a comprehensive and lightweight library for performing basic mathematical operations. Here are our plans: | ||
|
||
--- | ||
|
||
## Current Features | ||
|
||
- **Addition**: Adds multiple numbers. | ||
|
||
--- | ||
|
||
## Future Features | ||
|
||
1. **Subtraction**: | ||
|
||
- Function to subtract one number from another. | ||
- Example: `subtract(5, 3) // 2`. | ||
|
||
2. **Division**: | ||
|
||
- Function to divide one number by another. | ||
- Example: `divide(6, 2) // 3`. | ||
|
||
3. **Advanced Operations**: | ||
- Support for percentages. | ||
- Modular arithmetic. | ||
|
||
--- | ||
|
||
## Long-Term Vision | ||
|
||
- Ensure compatibility with various JavaScript frameworks. | ||
- Optimize performance for large datasets. | ||
- Provide thorough documentation and examples. | ||
|
||
--- | ||
|
||
Want to contribute to this roadmap? See our [Contributing Guide](./CONTRIBUTING.md) for details! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Support Guide | ||
|
||
If you need help with **Mathy**, here’s how to get assistance: | ||
|
||
--- | ||
|
||
## Questions and Discussions | ||
|
||
- Open a [Discussion](https://github.com/WebDevCaptain-Lab/oss-npm-package-workshop.git/discussions) to ask a question or seek advice. | ||
|
||
## Reporting Bugs | ||
|
||
- 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. | ||
|
||
## Feature Requests | ||
|
||
- 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). | ||
|
||
## Frequently Asked Questions (FAQ) | ||
|
||
1. **How do I install Mathy?** | ||
|
||
- Use npm: `npm install mathy`. | ||
|
||
2. **What versions of Node.js are supported?** | ||
- We support Node.js versions >=20. | ||
|
||
--- | ||
|
||
## Contact Us | ||
|
||
If your query is not addressed above, email us at **[[email protected]](mailto:[email protected])**. | ||
|
||
Please be patient as our team is small, but we’ll do our best to respond promptly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) [2025] [Shreyash (WebDevcaptain)] | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.