8000 Merge pull request #518 from MaoShizhong/contributing-md · claysb/javascript-exercises@59b5fc7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 59b5fc7

Browse files
authored
Merge pull request TheOdinProject#518 from MaoShizhong/contributing-md
Add repo-specific CONTRIBUTING.md
2 parents 45d06e1 + 098f3f4 commit 59b5fc7

File tree

2 files changed

+34
-11
lines changed

2 files changed

+34
-11
lines changed

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# The Odin Project JavaScript Exercises Contributing Guide
2+
3+
Thank you for expressing interest in contributing to The Odin Project (TOP) JavaScript exercises! Before continuing through this guide, be sure you've read our [general contributing guide](https://github.com/TheOdinProject/.github/blob/main/CONTRIBUTING.md), as it contains information that is important for all of our repos.
4+
5+
This contributing guide assumes you have followed the instructions in our general contributing guide to fork and clone our JavaScript exercises repo.
6+
7+
## Table of Contents
8+
9+
- [How to Contribute](#how-to-contribute)
10+
- [Prerequisites](#prerequisites)
11+
- [Adding New Exercises](#adding-new-exercises)
12+
13+
## How to Contribute
14+
15+
### Prerequisites
16+
17+
- Node v18.0.0 or higher
18+
- npm v8.5.5 or higher
19+
20+
### Adding New Exercises
21+
22+
> [!IMPORTANT]
23+
> Please do not open a pull request with a new exercise unless you have opened an issue in this repo with your proposal **and** it has been approved by a maintainer.
24+
25+
If a maintainer has approved a new exercise to be added, the new exercise(s) must follow the same format as existing exercises.
26+
27+
To generate a new exercise template, do the following:
28+
29+
1. Be sure to run `npm install` at the root of the `javascript-exercises` directory to install the necessary dependencies.
30+
1. Run the command `npm run generate`.
31+
1. When prompted, enter the name of the new exercise in "camelCase" syntax. This will create a new directory with the necessary files included.
32+
1. Update the `README.md` and `.spec.js` file, as well as the files inside the `solution` directory of the new exercise.
33+
1. Open a pull request with the new exercise.

README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ These JavaScript exercises are intended to complement the JavaScript content on
44

55
## Contributing
66

7-
If you have a suggestion to improve an exercise, an idea for a new exercise, or notice an issue with an exercise, please feel free to open an issue after thoroughly reading our [contributing guide](https://github.com/TheOdinProject/.github/blob/main/CONTRIBUTING.md).
7+
If you have a suggestion to improve an exercise, an idea for a new exercise, or notice an issue with an exercise, please feel free to open an issue after thoroughly reading our [contributing guide](https://github.com/TheOdinProject/javascript-exercises/blob/main/CONTRIBUTING.md).
88

99
## How To Use These Exercises
1010

@@ -38,13 +38,3 @@ The first exercise, `helloWorld`, will walk you through the process in-depth.
3838
## Debugging
3939

4040
To debug functions, you can run the tests in the Visual Studio Code debugger terminal. You can open this by clicking the "Run and Debug" icon on the left or pressing <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>D</kbd>, then clicking JavaScript Debug Terminal. You will be able to set breakpoints as you would in the Chrome DevTools debugger. You can run `npm test exerciseName.spec.js` to then execute your code up until your breakpoint and step through your code as necessary. **NOTE**: To take advantage of the debugger, you **MUST** run the script in the debugger terminal, not the bash or zsh terminal.
41-
42-
## Adding a new exercise
43-
44-
To add a new exercise:
45-
46-
1. Be sure to run `npm install` at the root of the `javascript-exercises` directory.
47-
2. Run the command `npm run generate`.
48-
3. When prompted, enter the name of the new exercise in "camelCase" syntax.
49-
50-
After entering an exercise name, a new directory with the necessary files will be created. You will then need to update the `README.md` and `spec.js` files as well as the files in the `solution` directory of the new exercise.

0 commit comments

Comments
 (0)
0