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/wundertax/javascript-kata.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.
-
Install dependencies:
npm i
-
Run
startscript:npm run 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.
-
webpackfor building and bundling:.jsand.cssfiles work out of the box.- entry point is
src/index.jsfile. - bundle is being written in
dist/main.js.
-
jestfor testing. -
eslintfor code checking. -
webpack-dev-serverfor hacking:- configured to serve content of
dist,dataandstaticfolders. If you run server, CSV files are gonna be available from the root, e.g.data/authors.csvwill be served over http://localhost:9000/authors.csv - supports live reload
- configured to serve content of
-
babelfor code transpiling:- preconfigured with
preset-envandpreset-react. plugin-transform-runtimeplugin to supportasync/await.
- preconfigured with
Hint: if you prefer using another build tool/bundler/test suite/etc: feel free to modify whatever you need.
For code check:
npm run lintTo fix the linting errors:
npm run lint:fixnpm run testSee LICENSE file.