You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42-37Lines changed: 42 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,40 +2,41 @@
2
2
3
3
Code kata in JavaScript where you have to write a library of books and magazines.
4
4
5
-
[A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition.](https://en.wikipedia.org/wiki/Kata_(programming))
5
+
[A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition.](<https://en.wikipedia.org/wiki/Kata_(programming)>)
6
6
7
-
*[Frame conditions](#frame-conditions)
8
-
*[Tasks](#tasks)
9
-
*[Procedure](#procedure)
10
-
*[License](#license)
7
+
-[Frame conditions](#frame-conditions)
8
+
-[Tasks](#tasks)
9
+
-[Procedure](#procedure)
10
+
-[FAQ](#faq)
11
+
-[License](#license)
11
12
12
13
## Frame conditions
13
14
14
-
1. You have exact __2.5 hours__ of time - __no minute longer__.
15
+
1. You have exact **2.5 hours** of time - **no minute longer**.
15
16
If you reach this time limit stop your work immediately.
16
17
It is one part of the kata to respect this time limit.
17
18
There are no restrictions on how to use the provided time.
18
-
If you want to code the entire time, take a break or a cigaret - it’s up to you.
19
+
If you want to code the entire time, take a break or a cigaret - it’s up to you.
19
20
20
21
2. There is no complete or incomplete, most likely it'll be impossible to close all the tasks in the first run (that's the point of kata as a type of practice). Keep in mind following priorities though:
21
-
1.__Code quality and structure__.
22
+
1.**Code quality and structure**.
22
23
2. Functionality.
23
24
3. UI/UX.
24
25
25
-
4. This is a real world situation. You are allowed to consult the Internet, use every library you want, call a friend...
26
+
3. This is a real world situation. You are allowed to consult the Internet, use every library you want, call a friend...
26
27
**BUT you're NOT allowed to:**
27
-
* do pair programming
28
-
* have a look at your previous implementation of this kata if you've done it before
28
+
- do pair programming
29
+
- have a look at your previous implementation of this kata if you've done it before
29
30
30
-
5. Given resources:
31
-
*[`authors.csv`](data/authors.csv): Contains authors with its `email`, `firstName` and `lastName`.
32
-
*[`books.csv`](data/books.csv): Contains books with its `title`, `description`, one or more `authors` and an `isbn`.
33
-
*[`magazines.csv`](data/magazines.csv): Contains magazines with its `title`, one or more `authors`, a `publishedAt` and an `isbn`.
31
+
4. Given resources:
32
+
-[`authors.csv`](data/authors.csv): Contains authors with its `email`, `firstName` and `lastName`.
33
+
-[`books.csv`](data/books.csv): Contains books with its `title`, `description`, one or more `authors` and an `isbn`.
34
+
-[`magazines.csv`](data/magazines.csv): Contains magazines with its `title`, one or more `authors`, a `publishedAt` and an `isbn`.
34
35
35
36
## Tasks
36
37
37
-
*[Main tasks](#main-tasks)
38
-
*[Optional tasks](#optional-tasks)
38
+
-[Main tasks](#main-tasks)
39
+
-[Optional tasks](#optional-tasks)
39
40
40
41
### Main tasks
41
42
@@ -66,7 +67,7 @@ Code kata in JavaScript where you have to write a library of books and magazines
2. Just download it from [here](https://github.com/echocat/javascript-kata-1/archive/master.zip)
70
+
2. Just download it from [here](https://github.com/echocat/javascript-kata-1/archive/main.zip)
70
71
71
72
2. Open in your favorite text editor/IDE.
72
73
@@ -78,58 +79,62 @@ Code kata in JavaScript where you have to write a library of books and magazines
78
79
79
80
## FAQ
80
81
82
+
- [How to run your application?](#how-to-run-your-application)
83
+
- [What's the structure of the boilerplate?](#whats-the-structure-of-the-boilerplate)
84
+
- [How to lint your code?](#how-to-lint-your-code)
85
+
- [How to run your tests?](#how-to-run-your-tests)
86
+
81
87
### How to run your application?
82
88
83
89
1. Install dependencies:
90
+
84
91
```bash
85
92
npm i
86
93
```
87
94
88
95
2. Run `start` script:
96
+
89
97
```bash
90
-
npm run start
98
+
npm start
91
99
```
92
-
100
+
93
101
This command will run dev server. After this the project is accessible on [http://localhost:9000/](http://localhost:9000/)
94
102
95
-
#### What's the structure of the boilerplate?
103
+
### What's the structure of the boilerplate?
96
104
97
105
>**Important!**`react` and `react-dom` are already included in`package.json`. If you want to use other libraries/frameworks, you have to install and include them manually.
98
106
99
-
1. [`webpack`](https://webpack.js.org/) for building and bundling:
100
-
*`.js` and `.css` files work out of the box.
101
-
* entry point is `src/index.js` file.
102
-
* bundle is being written in`dist/main.js`.
107
+
1. [`vite`](https://vite.dev/) for building and bundling:
108
+
-`.js` and `.css` files work out of the box.
109
+
- entry point is `src/index.js` file.
110
+
- bundle is being written in`dist/assets/index-*.js`.
103
111
104
-
2. [`jest`](https://jestjs.io/) for testing.
112
+
2. [`vitest`](https://vitest.dev/) for testing.
105
113
106
114
3. [`eslint`](https://eslint.org/) for code checking.
107
115
108
-
3. [`webpack-dev-server`](https://webpack.js.org/configuration/dev-server/) for hacking:
109
-
* configured to serve content of `dist`, `data` and `static` folders. If you run server, CSV files are gonna be available from the root, e.g. `data/authors.csv` will be served over [http://localhost:9000/authors.csv](http://localhost:9000/authors.csv)
110
-
* supports live reload
111
-
112
-
4. [`babel`](https://babeljs.io/) for code transpiling:
113
-
* preconfigured with `preset-env` and `preset-react`.
114
-
*`plugin-transform-runtime` plugin to support `async`/`await`.
115
-
>**Hint:**if you prefer using another build tool/bundler/test suite/etc: feel free to modify whatever you need.
116
+
4. [`prettier`](https://prettier.io/) for formatting the code.
0 commit comments