Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eimantas version #1

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# editorconfig.org
root = true

[*]

charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
webpack.config.dev.js
webpack.config.prod.js
38 changes: 38 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
}
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
npm-debug.log
# See http://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
node_modules

# production
build

# misc
.DS_Store
npm-debug.log*
.idea
api.json
251 changes: 137 additions & 114 deletions api.json
Original file line number Diff line number Diff line change
@@ -1,120 +1,143 @@
{
"subjects": ["Fiction", "Science"],
"subjects": [
"Fiction",
"Science"
],
"books": [
{
"id":1342,
"authors":[
{
"birth_year":1775,
"death_year":1817,
"name":"Austen, Jane"
}
],
"bookshelves":[
"Best Books Ever Listings",
"Harvard Classics"
],
"download_count":45668,
"formats":{
"text/plain; charset=utf-8":"http://www.gutenberg.org/files/1342/1342-0.txt",
"application/pdf":"http://www.gutenberg.org/files/1342/1342-pdf.pdf",
"application/rdf+xml":"http://www.gutenberg.org/ebooks/1342.rdf",
"application/x-mobipocket-ebook":"http://www.gutenberg.org/ebooks/1342.kindle.noimages",
"application/epub+zip":"http://www.gutenberg.org/ebooks/1342.epub.images",
"text/plain; charset=us-ascii":"http://www.gutenberg.org/files/1342/1342.txt",
"text/html; charset=utf-8":"http://www.gutenberg.org/files/1342/1342-h/1342-h.htm"
},
"languages":[
"en"
],
"media_type":"Text",
"subjects": ["Fiction"],
"title":"Pride and Prejudice"
{
"id": 1342,
"authors": [
{
"birth_year": 1775,
"death_year": 1817,
"name": "Austen, Jane"
}
],
"bookshelves": [
"Best Books Ever Listings",
"Harvard Classics"
],
"download_count": 45668,
"formats": {
"text/plain; charset=utf-8": "http://www.gutenberg.org/files/1342/1342-0.txt",
"application/pdf": "http://www.gutenberg.org/files/1342/1342-pdf.pdf",
"application/rdf+xml": "http://www.gutenberg.org/ebooks/1342.rdf",
"application/x-mobipocket-ebook": "http://www.gutenberg.org/ebooks/1342.kindle.noimages",
"application/epub+zip": "http://www.gutenberg.org/ebooks/1342.epub.images",
"text/plain; charset=us-ascii": "http://www.gutenberg.org/files/1342/1342.txt",
"text/html; charset=utf-8": "http://www.gutenberg.org/files/1342/1342-h/1342-h.htm"
},
{
"id":33283,
"authors":[
{
"birth_year":1851,
"death_year":1916,
"name":"Thompson, Silvanus P. (Silvanus Phillips)"
}
],
"bookshelves":[
"Mathematics"
],
"download_count":24344,
"formats":{
"application/prs.tex":"http://www.gutenberg.org/files/33283/33283-t.zip",
"application/rdf+xml":"http://www.gutenberg.org/ebooks/33283.rdf",
"application/pdf":"http://www.gutenberg.org/files/33283/33283-pdf.pdf"
},
"languages":[
"en"
],
"media_type":"Text",
"subjects": ["Fiction"],
"title":"Calculus Made Easy: Being a very-simplest introduction to those beautiful methods which are generally called by the terrifying names of the Differential Calculus and the Integral Calculus"
"languages": [
"en"
],
"media_type": "Text",
"subjects": [
"Fiction"
],
"title": "Pride and Prejudice"
},
{
"subjectOptions": [
"Fiction",
"Science"
],
"id": 33283,
"authors": [
{
"birth_year": 1851,
"death_year": 1916,
"name": "Thompson, Silvanus P. (Silvanus Phillips)"
}
],
"bookshelves": [
"Mathematics"
],
"download_count": 24344,
"formats": {
"application/prs.tex": "http://www.gutenberg.org/files/33283/33283-t.zip",
"application/rdf+xml": "http://www.gutenberg.org/ebooks/33283.rdf",
"application/pdf": "http://www.gutenberg.org/files/33283/33283-pdf.pdf"
},
{
"id":11,
"authors":[
{
"birth_year":1832,
"death_year":1898,
"name":"Carroll, Lewis"
}
],
"bookshelves":[
"Children's Literature"
],
"download_count":17866,
"formats":{
"text/plain; charset=utf-8":"http://www.gutenberg.org/files/11/11-0.zip",
"application/rdf+xml":"http://www.gutenberg.org/ebooks/11.rdf",
"application/pdf":"http://www.gutenberg.org/files/11/11-pdf.pdf",
"application/x-mobipocket-ebook":"http://www.gutenberg.org/ebooks/11.kindle.noimages",
"application/epub+zip":"http://www.gutenberg.org/ebooks/11.epub.images",
"text/plain; charset=us-ascii":"http://www.gutenberg.org/files/11/11.zip",
"application/zip":"http://www.gutenberg.org/files/11/11-h.zip",
"text/html; charset=utf-8":"http://www.gutenberg.org/files/11/11-h/11-h.htm"
},
"languages":[
"en"
],
"media_type":"Text",
"subjects": ["Fiction", "Science"],
"title":"Alice's Adventures in Wonderland"
"languages": [
"en"
],
"media_type": "Text",
"subjects": [
"Fiction"
],
"title": "Calculus Made Easy: Being a very-simplest introduction to those beautiful methods which are generally called by the terrifying names of the Differential Calculus and the Integral Calculus",
"isActive": true
},
{
"id": 11,
"authors": [
{
"birth_year": 1832,
"death_year": 1898,
"name": "Carroll, Lewis"
}
],
"bookshelves": [
"Children's Literature"
],
"download_count": 17866,
"formats": {
"text/plain; charset=utf-8": "http://www.gutenberg.org/files/11/11-0.zip",
"application/rdf+xml": "http://www.gutenberg.org/ebooks/11.rdf",
"application/pdf": "http://www.gutenberg.org/files/11/11-pdf.pdf",
"application/x-mobipocket-ebook": "http://www.gutenberg.org/ebooks/11.kindle.noimages",
"application/epub+zip": "http://www.gutenberg.org/ebooks/11.epub.images",
"text/plain; charset=us-ascii": "http://www.gutenberg.org/files/11/11.zip",
"application/zip": "http://www.gutenberg.org/files/11/11-h.zip",
"text/html; charset=utf-8": "http://www.gutenberg.org/files/11/11-h/11-h.htm"
},
{
"id":74,
"authors":[
{
"birth_year":1835,
"death_year":1910,
"name":"Twain, Mark"
}
],
"bookshelves":[
"Banned Books from Anne Haight's list"
],
"download_count":16204,
"formats":{
"image/jpeg":"http://www.gutenberg.org/cache/epub/74/pg74.cover.medium.jpg",
"text/plain; charset=utf-8":"http://www.gutenberg.org/files/74/74-0.zip",
"application/rdf+xml":"http://www.gutenberg.org/ebooks/74.rdf",
"application/x-mobipocket-ebook":"http://www.gutenberg.org/ebooks/74.kindle.images",
"application/epub+zip":"http://www.gutenberg.org/ebooks/74.epub.noimages",
"text/html; charset=utf-8":"http://www.gutenberg.org/files/74/74-h/74-h.htm",
"text/plain; charset=iso-8859-1":"http://www.gutenberg.org/files/74/74.txt",
"application/zip":"http://www.gutenberg.org/files/74/74.zip"
},
"languages":[
"en"
],
"media_type":"Text",
"subjects": ["Science"],
"title":"The Adventures of Tom Sawyer"
}
"languages": [
"en"
],
"media_type": "Text",
"subjects": [
"Fiction",
"Science"
],
"title": "Alice's Adventures in Wonderland",
"isActive": true
},
{
"subjectOptions": [
"Fiction",
"Science"
],
"id": 74,
"authors": [
{
"birth_year": 1835,
"death_year": 1910,
"name": "Twain, Mark"
}
],
"bookshelves": [
"Banned Books from Anne Haight's list"
],
"download_count": 16204,
"formats": {
"image/jpeg": "http://www.gutenberg.org/cache/epub/74/pg74.cover.medium.jpg",
"text/plain; charset=utf-8": "http://www.gutenberg.org/files/74/74-0.zip",
"application/rdf+xml": "http://www.gutenberg.org/ebooks/74.rdf",
"application/x-mobipocket-ebook": "http://www.gutenberg.org/ebooks/74.kindle.images",
"application/epub+zip": "http://www.gutenberg.org/ebooks/74.epub.noimages",
"text/html; charset=utf-8": "http://www.gutenberg.org/files/74/74-h/74-h.htm",
"text/plain; charset=iso-8859-1": "http://www.gutenberg.org/files/74/74.txt",
"application/zip": "http://www.gutenberg.org/files/74/74.zip"
},
"languages": [
"en"
],
"media_type": "Text",
"subjects": [
"Science"
],
"title": "The Adventures of Tom Sawyer",
"isActive": true
}
]
}
}
Empty file added npm-debug.log.1016691725
Empty file.
36 changes: 31 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,39 @@
"name": "react-coding-challenge",
"version": "1.0.0",
"description": "A package containing a simple dummy book API, which should be used in the challenge",
"scripts": {
"start": "json-server --port 3010 --watch api.json"
},
"keywords": ["react challenge", "tryouts", "react developer", "hiring"],
"keywords": [
"react challenge",
"tryouts",
"react developer",
"hiring"
],
"author": "Adapt A/S",
"license": "ISC",
"dependencies": {
"prop-types": "^15.5.8",
"react": "^15.5.0",
"react-dom": "^15.5.0",
"react-redux": "^5.0.3",
"redux": "^3.5.2",
"redux-thunk": "^2.1.0",
"json-server": "0.10.1",
"redux-logger": "^3.0.0"
},
"scripts": {
"start": "json-server --port 3010 --watch api.json | react-scripts start",
"build": "react-scripts build",
"eject": "react-scripts eject",
"test": "react-scripts test",

"lint": "node_modules/.bin/eslint src"
},
"devDependencies": {
"json-server": "0.10.1"
"autoprefixer": "^6.3.6",
"babel-eslint": "^6.0.4",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.0.1",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-jsx-a11y": "^5.0.3",
"eslint-plugin-react": "^7.0.1"
}
}
13 changes: 13 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
<title>Books</title>
</head>
<body>
<div id="root"></div>

</body>
</html>
Loading