Skip to content

Commit 3f790eb

Browse files
committed
Edit readme to use actual use case
1 parent 379a851 commit 3f790eb

1 file changed

Lines changed: 22 additions & 8 deletions

File tree

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,41 @@ First, you have to clone project
2121
git clone https://github.com/403-html/javascript-coding-challenges.git
2222
```
2323

24-
Then search for intresting challenge, for example `prime-number`.
25-
Read the `README.md` in that folder. Write you solution in this folder.
24+
then install all dependencies
25+
26+
for npm
27+
28+
```
29+
npm install
30+
```
2631

27-
At the end of your file export your function
32+
or yarn
2833

2934
```
30-
module.exports = name_of_your_function
35+
yarn install
3136
```
3237

33-
Go to folder `__tests__` in that folder, there will be test file (named in our example `isPrime.spec.js`). Change the first line from
38+
Then search for intresting challenge, for example `prime-number`.
39+
Read the `README.md` in that folder. Write you solution in javascript file dedicated to this folder (in our case `isPrime.js`). There is special place dedicated for that.
40+
41+
If you're sure it's all good, go to `__tests__` folder and open test file. Remove `.skip` method in tests and save.
42+
43+
Run tests by npm
3444

3545
```
36-
const isPrime = require('../isPrime')
46+
npm run prime-number
3747
```
3848

39-
to
49+
or if you're using yarn
4050

4151
```
42-
const isPrime = require('../name_of_your_file')
52+
yarn run prime-number
4353
```
4454

55+
**If you take other task to do just use name of task folder instead of `prime-number`.**
56+
57+
**Enjoy!**
58+
4559
## Contributors
4660

4761
> Author: Tymoteusz '403-html' Stępień

0 commit comments

Comments
 (0)