|
1 | 1 | # Contributing to Vanilla Verse |
2 | 2 |
|
3 | | -Thanks for your interest in contributing! This project is designed for first-time contributors. |
| 3 | +Welcome! This guide will help you make your first contribution. No experience needed—just follow the steps below. |
4 | 4 |
|
5 | | -## Ways to contribute |
6 | | -- Pick a project from the hub (`index.html`) and open its folder in `projects/vanilla-verse`. |
7 | | -- Read the local `README.md` and `main.js` of projects for TODO markers. |
8 | | -- Open an issue to ask questions or propose a change. |
| 5 | +## How to contribute (Step-by-step) |
9 | 6 |
|
10 | | -## Development setup |
11 | | -1. Use VS Code with the Live Server extension (recommended) or any static HTTP server. |
12 | | -2. Open `index.html` and ensure links to projects work. |
13 | | -3. Make small, focused changes. |
| 7 | +### 1. Fork the repository |
| 8 | +- Click the **Fork** button at the top right of the GitHub page. This creates your own copy of the project. |
14 | 9 |
|
15 | | -## Commit and PR guidelines |
16 | | -- Use meaningful commit messages. |
17 | | -- Title PRs clearly (e.g., "Snake: Add keyboard controls" or "Todo: Persist to localStorage"). |
18 | | -- Link related issues, and check the "good first issue" label when appropriate. |
19 | | -- Ensure HTML/JS syntax passes basic validation (no console errors on load). |
| 10 | +### 2. Clone your fork |
| 11 | +- On your forked repo, click **Code** and copy the URL. |
| 12 | +- Open your terminal and run: |
| 13 | + ```bash |
| 14 | + git clone https://github.com/your-username/vanilla-verse.git |
| 15 | + cd vanilla-verse |
| 16 | + ``` |
20 | 17 |
|
21 | | -### Issue → Assign → PR flow (enforced) |
| 18 | +### 3. Pick a project to work on |
| 19 | +- Open `index.html` and look at the projects listed. |
| 20 | +- Go to the folder in `projects/vanilla-verse` for the project you want. |
22 | 21 |
|
23 | | -To keep work organized and make it simple for maintainers to triage contributions we follow this flow and enforce it via a repository check: |
| 22 | +### 4. Read the local files |
| 23 | +- Check the `README.md` and `main.js` in the project folder for TODOs or ideas. |
| 24 | +- If you have questions or want to suggest something, open an issue on GitHub. |
24 | 25 |
|
25 | | -1. Create an issue describing the change you want to make. Use the provided issue templates when appropriate. Alternatively, get alloted in an existing issue. |
26 | | -2. A maintainer (or you, if given permission) assigns the issue to someone. The assignment signals ownership and helps avoid duplicate work. |
27 | | -3. Open a pull request that references the assigned issue in the PR body (for example: `Closes #12`, `Fixes #12`, or include `#12` somewhere in the PR description). |
| 26 | +### 5. Make your changes |
| 27 | +- Use [VS Code](https://code.visualstudio.com/) with the Live Server extension (recommended) or any static HTTP server. |
| 28 | +- Edit the code. Make small, focused changes. |
28 | 29 |
|
29 | | -Our CI includes a check that requires PRs to reference an existing issue that is already assigned. If you open a PR without a referenced assigned issue, the check will fail and a maintainer will ask you to link/assign the issue first. |
| 30 | +### 6. Commit your changes |
| 31 | +- Save your work and run: |
| 32 | + ```bash |
| 33 | + git add . |
| 34 | + git commit -m "Describe your change here" |
| 35 | + git push |
| 36 | + ``` |
30 | 37 |
|
31 | | -Why this helps: |
32 | | -- Prevents duplicated effort (two people solving the same item at once). |
33 | | -- Makes it clear who owns the change and who to ask for review. |
34 | | -- Keeps the issue tracker meaningful (issues move to closed automatically when referenced with `Closes #N`). |
| 38 | +### 7. Open a Pull Request (PR) |
| 39 | +- Go to your fork on GitHub. Click **Compare & pull request**. |
| 40 | +- In the PR description, reference the issue you worked on (e.g., `Closes #12`). |
| 41 | +- Title your PR clearly (e.g., "Snake: Add keyboard controls"). |
35 | 42 |
|
36 | | -Examples (PR body): |
| 43 | +### 8. Wait for review |
| 44 | +- A maintainer will review your PR and may suggest changes. |
| 45 | +- If needed, update your PR by pushing more commits. |
37 | 46 |
|
38 | | -``` |
39 | | -Closes #12 |
| 47 | +## Issue → Assign → PR flow |
40 | 48 |
|
41 | | -Add keyboard controls to the Snake game. This PR implements arrow keys and prevents reverse-direction input. |
42 | | -``` |
| 49 | +To keep things organized: |
| 50 | +1. **Create an issue** describing your change or pick an existing one. |
| 51 | +2. **Get assigned** to the issue (ask in a comment if needed). |
| 52 | +3. **Open a PR** that references the assigned issue. |
43 | 53 |
|
44 | | -If you're a new contributor and there are no maintainers available to assign, open the issue and add a comment asking for assignment — maintainers will triage and assign as soon as they can. |
| 54 | +PRs must reference an assigned issue, or checks will fail. |
45 | 55 |
|
46 | | -## Code style |
47 | | -- Vanilla JS only. No frameworks, no bundlers. |
48 | | -- Keep modules small and focused. |
49 | | -- Favor semantic HTML and accessible markup. |
50 | | -- Use `assets/styles.css` tokens and utility classes where possible to keep visual consistency. |
| 56 | +## Code style tips |
| 57 | +- Use plain JavaScript (no frameworks). |
| 58 | +- Keep files small and focused. |
| 59 | +- Write semantic HTML and accessible markup. |
| 60 | +- Use styles from `assets/styles.css` for consistency. |
51 | 61 |
|
52 | 62 | ## Reporting issues |
53 | | -Please include: |
54 | | -- What you expected vs what happened |
| 63 | +Include: |
| 64 | +- What you expected vs. what happened |
55 | 65 | - Steps to reproduce |
56 | | -- Screenshots or code snippets if helpful |
| 66 | +- Screenshots or code snippets if possible |
57 | 67 |
|
58 | 68 | ## Code of Conduct |
59 | | -By participating, you agree to abide by our `CODE_OF_CONDUCT.md`. |
| 69 | +By contributing, you agree to follow our [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md). |
| 70 | + |
| 71 | +--- |
| 72 | + |
| 73 | +**You got this!** If you get stuck, ask questions in issues. Maintainers are here to help. |
0 commit comments