|
1 | | -### Contributing |
2 | | -- Give it a [star](https://github.com/VincentLoy/simplyCountdown.js/stargazers) ! |
3 | | -- [Report a bug](https://github.com/VincentLoy/simplyCountdown.js/issues) |
4 | | -- Tweet about it :) |
5 | | - |
6 | | -#### Pull Requests |
7 | | -- **Solve a problem** |
8 | | -- For code enhancement, use [ESLint](https://eslint.org/) as a code quality tool. |
9 | | -- Small is better than Big. |
| 1 | +# Contributing to SimplyCountdown.js |
| 2 | + |
| 3 | +🎉 Thank you for considering contributing to SimplyCountdown.js! I appreciate your support and I'm excited to collaborate with you. Below are the guidelines to help you get started. |
| 4 | + |
| 5 | +## How to Contribute |
| 6 | + |
| 7 | +### ⭐ 0. Give a Star to the Repository |
| 8 | + |
| 9 | +This step is totally optional... but seriously, who doesn't love some stars? 😉 |
| 10 | +It's like giving a virtual high-five to the project! 🙌 ⭐ 🙌 |
| 11 | + |
| 12 | +### 🔱 1. Fork the Repository |
| 13 | + |
| 14 | +Start by forking the repository to your GitHub account. |
| 15 | + |
| 16 | +### 📥 2. Clone Your Fork |
| 17 | + |
| 18 | +Clone your forked repository to your local machine: |
| 19 | + |
| 20 | +```bash |
| 21 | +git clone [email protected]:your-username/simplyCountdown.js.git |
| 22 | +cd simplyCountdown.js |
| 23 | +``` |
| 24 | + |
| 25 | +### 🔧 3. Node.js Version |
| 26 | + |
| 27 | +Make sure you're using the correct Node.js version. You can check the required version in `.nvmrc`. If you use [nvm](https://github.com/nvm-sh/nvm), simply run: |
| 28 | + |
| 29 | +```bash |
| 30 | +nvm use |
| 31 | +``` |
| 32 | + |
| 33 | +This will automatically switch to the correct Node.js version for the project. |
| 34 | + |
| 35 | +### 🛠️ 4. Set Up the Development Environment |
| 36 | + |
| 37 | +Install the necessary dependencies: |
| 38 | +We recommend using [bun](https://bun.sh/) as it offers superior performance and seamless dependency management. |
| 39 | + |
| 40 | +```bash |
| 41 | +bun install |
| 42 | +``` |
| 43 | + |
| 44 | +**NOTE:** _For now, `package.json` is running bun commands only, maybe we will have to update this to be compatible with any package management system in the future_ |
| 45 | + |
| 46 | +### 🌿 5. Create a Branch |
| 47 | + |
| 48 | +Create a new branch for your feature or bugfix: |
| 49 | + |
| 50 | +```bash |
| 51 | +git checkout -b feature/your-feature-name |
| 52 | +``` |
| 53 | + |
| 54 | +### 💻 6. Make Your Changes |
| 55 | + |
| 56 | +Make your changes to the codebase. Ensure your code follows the project's code style and formatting guidelines. |
| 57 | +While developping, you should run this command: |
| 58 | + |
| 59 | +```bash |
| 60 | +bun run dev |
| 61 | +``` |
| 62 | + |
| 63 | +**NOTE:** _This will run a dev server with Vite, update the sources from `src/core` and tests your new features in `docs/src` files like `docs/src/index.html` and `docs/src/assets/js/main.js`. Each changes inside those files will refresh the dev page_ |
| 64 | + |
| 65 | +### ✅ 7. Test Your Changes |
| 66 | + |
| 67 | +Build, then, run the tests to make sure your changes don't break anything: |
| 68 | + |
| 69 | +```bash |
| 70 | +bun run build |
| 71 | +``` |
| 72 | + |
| 73 | +then: |
| 74 | + |
| 75 | +```bash |
| 76 | +bun run dist:test:serve |
| 77 | +``` |
| 78 | + |
| 79 | +**NOTE:** _This will generate various HTML files inside a `dist_test` directory and run a temporary node.js server where you can check different implementations and use-cases of the distribution files. Every HTML pages should run a working countdown._ |
| 80 | + |
| 81 | +### 💾 8. Commit Your Changes |
| 82 | + |
| 83 | +Commit your changes with a clear and concise commit message: |
| 84 | + |
| 85 | +```bash |
| 86 | +git add . |
| 87 | +git commit -m "Add feature: your feature description" |
| 88 | +``` |
| 89 | + |
| 90 | +### 🚀 9. Push to Your Fork |
| 91 | + |
| 92 | +Push your changes to your forked repository: |
| 93 | + |
| 94 | +```bash |
| 95 | +git push origin feature/your-feature-name |
| 96 | +``` |
| 97 | + |
| 98 | +### 🔄 10. Open a Pull Request |
| 99 | + |
| 100 | +Open a pull request from your forked repository to the main repository. Provide a detailed description of your changes and any relevant information. |
| 101 | + |
| 102 | +## Pull Request Process |
| 103 | + |
| 104 | +- Provide a detailed description of your changes in the pull request. |
| 105 | +- Link any relevant issues in the pull request description. |
| 106 | +- Wait for a maintainer to review your pull request. |
| 107 | + |
| 108 | +## Creating Issues |
| 109 | + |
| 110 | +If you find a bug or have a feature request, please create an issue in the repository. Provide as much detail as possible, including steps to reproduce the issue or a clear description of the feature. |
| 111 | + |
| 112 | +## Code Review Process |
| 113 | + |
| 114 | +All pull requests will be reviewed by a maintainer. The review process includes: |
| 115 | + |
| 116 | +- Checking for code quality and adherence to the style guide. |
| 117 | +- Ensuring tests are passing. |
| 118 | +- Providing feedback and requesting changes if necessary. |
| 119 | + |
| 120 | +## Documentation |
| 121 | + |
| 122 | +For more information about the project, please refer to the [README.md](README.md) and the [documentation website](https://vincentloy.github.io/simplyCountdown.js/). |
| 123 | + |
| 124 | +Thank you for contributing! 🚀 |
0 commit comments