Code kata in JavaScript where you have to write a library of books and magazines.
-
You have exact 2.5 hours of time - no minute longer. If you reach this time limit stop your work immediately. It is one part of the kata to respect this time limit. There are no restrictions on how to use the provided time. If you want to code the entire time, take a break or a cigaret - it’s up to you.
-
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:
- Code quality and structure.
- Functionality.
- UI/UX.
-
This is a real world situation. You are allowed to consult the Internet, use every library you want, call a friend... BUT you're NOT allowed to:
- do pair programming
- have a look at your previous implementation of this kata if you've done it before
-
Given resources:
authors.csv: Contains authors with itsemail,firstNameandlastName.books.csv: Contains books with itstitle,description, one or moreauthorsand anisbn.magazines.csv: Contains magazines with itstitle, one or moreauthors, apublishedAtand anisbn.
-
Parse the data from the given CSV files in a meaningful structure.
-
Print out a merged list of books and magazines with all their details sorted by
title. -
Implement search:
- By
isbn. - By
authors' email.
- By
-
Add unit tests.
-
Implement adding a book/magazine to the data structure of your software.
-
Implement exporting of the new list to a CSV file.
-
Get the code. There are several ways for it:
-
With fork (makes it possible to preserve your work):
- Fork this repository
- Clone this fork to your computer:
git clone <your github url> # Example: git clone https://github.com/echocat/javascript-kata-1.git
-
Just download it from here
-
-
Open in your favorite text editor/IDE.
-
Start the kata.
-
Discuss with your friends and/or colleges your solution.
-
Repeat after some days/weeks.
- How to run your application?
- What's the structure of the boilerplate?
- How to lint your code?
- How to run your tests?
-
Install dependencies:
npm i
-
Run
startscript:npm start
This command will run dev server. After this the project is accessible on http://localhost:9000/
Important!
reactandreact-domare already included inpackage.json. If you want to use other libraries/frameworks, you have to install and include them manually.
-
vitefor building and bundling:.jsand.cssfiles work out of the box.- entry point is
src/index.jsfile. - bundle is being written in
dist/assets/index-*.js.
-
vitestfor testing. -
eslintfor code checking. -
prettierfor formatting the code.
For code check:
npm run lintTo fix the linting errors:
npm run lint:fixnpm testSee LICENSE file.