Upgrade dependencies; Remove unused dependencies & source

This commit is contained in:
Robbie Antenesse 2019-09-18 10:00:25 -06:00
parent 1cb78f5db2
commit ff1eb25252
13 changed files with 29 additions and 311 deletions

4
.browserslistrc Normal file
View File

@ -0,0 +1,4 @@
>1%
last 4 versions
Firefox ESR
not ie < 9

View File

@ -1,8 +1,8 @@
# Readlebee
[![Read our Contribution Guidelines](https://badges.frapsoft.com/os/v1/open-source.svg?v=102)](./CONTRIBUTING.md) [![Issues](https://img.shields.io/github/issues/Alamantus/Readlebee.svg)](https://gitlab.com/Alamantus/Readlebee/issues) [![Join the chat at https://gitter.im/Readlebee/community](https://badges.gitter.im/Readlebee/general.svg)](https://gitter.im/Readlebee/community)
[![Read our Contribution Guidelines](https://badges.frapsoft.com/os/v1/open-source.svg?v=102)](./CONTRIBUTING.md) [![Join the chat at https://gitter.im/Readlebee/community](https://badges.gitter.im/Readlebee/general.svg)](https://gitter.im/Readlebee/community) [![Dependencies Status](https://david-dm.org/Alamantus/Readlebee.svg)](https://david-dm.org/Alamantus/Readlebee) [![DevDependencies Status](https://david-dm.org/Alamantus/Readlebee/dev-status.svg)](https://david-dm.org/Alamantus/Readlebee?type=dev)
An attempt at a viable alternative to Goodreads (currently lacking a name—ideas welcome!)
An attempt at a viable alternative to Goodreads
## Important Links

View File

@ -20,8 +20,7 @@
"autoprefixer": "^9.6.1",
"choo-devtools": "^3.0.1",
"concurrently": "^4.1.2",
"cross-env": "^5.2.1",
"cssnano": "^4.1.10",
"cross-env": "^6.0.0",
"faker": "^4.1.0",
"parcel-bundler": "^1.12.3",
"parcel-plugin-goodie-bag": "^2.0.0",
@ -40,8 +39,6 @@
"fastify-jwt": "^1.0.0",
"fastify-postgres": "^2.0.0",
"fastify-static": "^2.5.0",
"handlebars": "^4.2.0",
"html-minifier": "^4.0.0",
"make-promises-safe": "^5.0.0",
"node-fetch": "^2.6.0",
"pg": "^7.12.1",

View File

@ -1,20 +0,0 @@
{{#> layout }}
{{#*inline "page-content-block" }}
<section>
{{#if message }}
<article class="card" style="background-color:cornflowerblue;color:white;width:100%;">
{{ message }}
</article>
{{/if}}
{{#if loggedIn }}
{{> home-logged-in }}
{{ else }}
{{> home-logged-out }}
{{/if}}
</section>
{{/inline}}
{{/layout}}

View File

@ -1,42 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ pageTitle }}</title>
<meta name="description" content="An attempt at a viable alternative to Goodreads">
<meta name="keywords" content="books, tracking, lists, bookshelves, bookshelf, rating, reviews, reading">
<link rel="manifest" href="manifest.webmanifest">
<meta name="theme-color" content="#000000">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="{{ pageTitle }}">
<link rel="apple-touch-icon" href="/images/icon-152.png">
<link rel="shortcut icon" type="image/png" href="/images/favicon.png" />
<link rel="stylesheet" href="/styles/index.css">{{!-- This is controlled by the resources router. --}}
</head>
<body>
{{#> header-block }}
{{> header }}
{{/header-block}}
<main class="container">
{{#> page-content-block }}
{{!-- Wrap the actual page content in {{#*inline "page-content-block"}} to insert it here --}}
{{/page-content-block}}
</main>
{{#> footer-block }}
{{> footer }}
{{/footer-block}}
{{#> scripts-block }}
{{/scripts-block}}
</body>
</html>

View File

@ -1,23 +0,0 @@
{{#> layout }}
{{#*inline "page-content-block" }}
<section>
<article class="card">
<form action="/login-validate" method="POST">
<label>
<span>Email</span>
<input type="email" name="email">
</label>
<label>
<span>Password</span>
<input type="password" name="password">
</label>
<input type="submit" value="Log In!">
</form>
</article>
</section>
{{/inline}}
{{/layout}}

View File

@ -1,8 +0,0 @@
<footer>
<nav>
<div class="links">
<a href="https://gitlab.com/Alamantus/Readlebee" class="pseudo button">Repo</a>
<a href="https://gitter.im/Readlebee/community" class="pseudo button">Chat</a>
</div>
</nav>
</footer>

View File

@ -1,23 +0,0 @@
<header>
<nav>
<div class="brand">
<a href="./">
<span class="title">Unnamed Book Tracker</span>
</a>
</div>
<!-- responsive-->
<input id="navMenu" type="checkbox" class="show">
<label for="navMenu" class="burger pseudo button">&#8801;</label>
<div class="menu">
<form action="/search" style="display: inline-block;">
<label>
<input type="text" id="headerSearchBar" name="for" placeholder="Search" value="{{searchTerm}}">
</label>
</form>
<a href="/login" class="pseudo button">Log In</a>
<a href="/logout" class="pseudo button">Log Out</a>
</div>
</nav>
</header>

View File

@ -1,16 +0,0 @@
<section>
<h2 class="subtitle">You are logged in!</h2>
{{#each statuses }}
<article class="card">
<header>
<p>A status about {{title}}</p>
</header>
<footer>
<button>Like!</button>
<button class="small dangerous">Dislike!</button>
</footer>
</article>
{{/each}}
</section>

View File

@ -1,18 +0,0 @@
<h2 class="subtitle">An attempt at a viable alternative to Goodreads</h2>
<article class="flex two">
<div class="half">
<div class="card">
<header>
<p>Still gotta figure out a design.</p>
</header>
</div>
</div>
<div class="half">
<div class="card">
<header>
<p>It's early days, my friends!</p>
</header>
</div>
</div>
</article>

View File

@ -1,37 +0,0 @@
{{#> layout }}
{{#*inline "page-content-block"}}
<section>
<h2 class="subtitle">An attempt at a viable alternative to Goodreads</h2>
<article>
{{#each results }}
<div class="card">
<header>
{{#each covers }}
<img src="{{this}}" />
{{/each}}
<h1 class="title">{{title}}</h1>
{{#each authors }}
<h2 class="subtitle">{{this}}</h2>
{{/each}}
</header>
</div>
{{/each}}
</article>
</section>
{{/inline}}
{{#*inline "footer-block"}}
{{#if arbitraryContent}}
{{arbitraryContent}}
{{/if}}
{{/inline}}
{{/layout}}

View File

@ -1,31 +0,0 @@
const fs = require('fs');
const path = require('path');
const partialFiles = fs.readdirSync(path.resolve(__dirname, 'partials')); // This is resolved from *this file's* dirname
const partials = {
layout: 'layout.hbs',
};
partialFiles.forEach(file => {
if (file.includes('.hbs')) {
const name = file.replace('.hbs', '');
partials[name] = `partials/${file}`;
}
});
module.exports = { // Adds the `view()` function to fastify's `reply` objects
engine: {
handlebars: require('handlebars'), // Use handlebar as the render engine for `reply.view()`
},
templates: 'views', // Search for all files referenced in `reply.view()` within the `views/` folder
options: {
useHtmlMinifier: require('html-minifier'), // Add a minifier to the rendered HTML output
htmlMinifierOptions: {
removeComments: true,
removeCommentsFromCDATA: true,
collapseWhitespace: true,
collapseBooleanAttributes: true,
removeEmptyAttributes: true
},
partials, // Specifies the Handlebars Partials so `point-of-view` knows where they are within the `views` folder and what they're called when referenced in a `.hbs` file
},
}

109
yarn.lock
View File

@ -1562,13 +1562,6 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"
clean-css@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17"
integrity sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==
dependencies:
source-map "~0.6.0"
cli-cursor@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
@ -1672,7 +1665,7 @@ command-exists@^1.2.6:
resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.8.tgz#715acefdd1223b9c9b37110a149c6392c2852291"
integrity sha512-PM54PkseWbiiD/mMsbvW351/u+dafwTJ0ye2qB60G1aGQP9j3xK2gmMDc+R34L3nDtx4qMCitXT75mkbkGJDLw==
commander@^2.11.0, commander@^2.19.0, commander@^2.20.0, commander@~2.20.0:
commander@^2.11.0, commander@^2.19.0, commander@^2.20.0:
version "2.20.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
@ -1814,14 +1807,14 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
safe-buffer "^5.0.1"
sha.js "^2.4.8"
cross-env@^5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.2.1.tgz#b2c76c1ca7add66dc874d11798466094f551b34d"
integrity sha512-1yHhtcfAd1r4nwQgknowuUNfIT9E8dOMMspC36g45dN+iD1blloi7xp8X/xAIDnjHWyt1uQ8PHk2fkNaym7soQ==
cross-env@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-6.0.0.tgz#3c8e71440ea20aa6faaf5aec541235efc565dac6"
integrity sha512-G/B6gtkjgthT8AP/xN1wdj5Xe18fVyk58JepK8GxpUbqcz3hyWxegocMbvnZK+KoTslwd0ACZ3woi/DVUdVjyQ==
dependencies:
cross-spawn "^6.0.5"
cross-spawn "^7.0.0"
cross-spawn@^6.0.0, cross-spawn@^6.0.4, cross-spawn@^6.0.5:
cross-spawn@^6.0.0, cross-spawn@^6.0.4:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
@ -1832,6 +1825,15 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.4, cross-spawn@^6.0.5:
shebang-command "^1.2.0"
which "^1.2.9"
cross-spawn@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.0.tgz#21ef9470443262f33dba80b2705a91db959b2e03"
integrity sha512-6U/8SMK2FBNnB21oQ4+6Nsodxanw1gTkntYA2zBdkFYFu3ZDx65P2ONEXGSvob/QS6REjVHQ9zxzdOafwFdstw==
dependencies:
path-key "^3.1.0"
shebang-command "^1.2.0"
which "^1.2.9"
crypto-browserify@^3.11.0:
version "3.12.0"
resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec"
@ -3081,17 +3083,6 @@ grapheme-breaker@^0.3.2:
brfs "^1.2.0"
unicode-trie "^0.3.1"
handlebars@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.2.0.tgz#57ce8d2175b9bbb3d8b3cf3e4217b1aec8ddcb2e"
integrity sha512-Kb4xn5Qh1cxAKvQnzNWZ512DhABzyFNmsaJf3OAkWNa4NkaqWcNI8Tao8Tasi0/F4JD9oyG0YxuFyvyR57d+Gw==
dependencies:
neo-async "^2.6.0"
optimist "^0.6.1"
source-map "^0.6.1"
optionalDependencies:
uglify-js "^3.1.4"
har-schema@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
@ -3191,11 +3182,6 @@ hash.js@^1.0.0, hash.js@^1.0.3:
inherits "^2.0.3"
minimalistic-assert "^1.0.1"
he@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
helmet-crossdomain@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/helmet-crossdomain/-/helmet-crossdomain-0.4.0.tgz#5f1fe5a836d0325f1da0a78eaa5fd8429078894e"
@ -3269,19 +3255,6 @@ html-encoding-sniffer@^1.0.2:
dependencies:
whatwg-encoding "^1.0.1"
html-minifier@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-4.0.0.tgz#cca9aad8bce1175e02e17a8c33e46d8988889f56"
integrity sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==
dependencies:
camel-case "^3.0.0"
clean-css "^4.2.1"
commander "^2.19.0"
he "^1.2.0"
param-case "^2.1.1"
relateurl "^0.2.7"
uglify-js "^3.5.1"
html-tags@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-1.2.0.tgz#c78de65b5663aa597989dd2b7ab49200d7e4db98"
@ -4260,11 +4233,6 @@ minimist@^1.1.3, minimist@^1.2.0:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
minimist@~0.0.1:
version "0.0.10"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=
minipass@2.3.5:
version "2.3.5"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848"
@ -4472,11 +4440,6 @@ needle@^2.2.1:
iconv-lite "^0.4.4"
sax "^1.2.4"
neo-async@^2.6.0:
version "2.6.1"
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c"
integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==
nice-try@^1.0.4:
version "1.0.5"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
@ -4800,14 +4763,6 @@ opn@^5.1.0:
dependencies:
is-wsl "^1.1.0"
optimist@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY=
dependencies:
minimist "~0.0.1"
wordwrap "~0.0.2"
optionator@^0.8.1:
version "0.8.2"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
@ -4913,13 +4868,6 @@ pako@~1.0.5:
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732"
integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==
param-case@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247"
integrity sha1-35T9jPZTHs915r75oIWPvHK+Ikc=
dependencies:
no-case "^2.2.0"
parcel-bundler@^1.12.3:
version "1.12.3"
resolved "https://registry.yarnpkg.com/parcel-bundler/-/parcel-bundler-1.12.3.tgz#2bbf70bfa2d06097f071653285040bd125684d09"
@ -5059,6 +5007,11 @@ path-key@^2.0.0, path-key@^2.0.1:
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
path-key@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.0.tgz#99a10d870a803bdd5ee6f0470e58dfcd2f9a54d3"
integrity sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg==
path-parse@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
@ -5918,11 +5871,6 @@ regjsparser@^0.6.0:
dependencies:
jsesc "~0.5.0"
relateurl@^0.2.7:
version "0.2.7"
resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"
integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=
remove-array-items@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/remove-array-items/-/remove-array-items-1.1.1.tgz#fd745ff73d0822e561ea910bf1b401fc7843e693"
@ -6382,7 +6330,7 @@ source-map-url@^0.4.0:
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=
source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
@ -6929,14 +6877,6 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
uglify-js@^3.1.4, uglify-js@^3.5.1:
version "3.6.0"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5"
integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==
dependencies:
commander "~2.20.0"
source-map "~0.6.1"
uid-safe@^2.1.5:
version "2.1.5"
resolved "https://registry.yarnpkg.com/uid-safe/-/uid-safe-2.1.5.tgz#2b3d5c7240e8fc2e58f8aa269e5ee49c0857bd3a"
@ -7232,11 +7172,6 @@ wide-align@^1.1.0:
dependencies:
string-width "^1.0.2 || 2"
wordwrap@~0.0.2:
version "0.0.3"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc=
wordwrap@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"