From 1e248151d5bd60e8c94ab26f272e5e9cf900ca7a Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Fri, 11 Oct 2019 19:08:14 +0200 Subject: Add folder structure parser --- .gitignore | 2 ++ api/api.js | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ netlify.toml | 2 +- nuxt.config.js | 7 ++++++- package.json | 6 +++--- 5 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 api/api.js diff --git a/.gitignore b/.gitignore index 8c6652c..83c10f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +kronika + # Created by .ignore support plugin (hsz.mobi) ### Node template # Logs diff --git a/api/api.js b/api/api.js new file mode 100644 index 0000000..f0d3894 --- /dev/null +++ b/api/api.js @@ -0,0 +1,49 @@ +const fs = require('fs') + +const POSTS_PATH = './kronika/wpisy' + +function getPosts() { + const routesArray = [] + try { + const years = fs.readdirSync(`${POSTS_PATH}`) + years.forEach((year) => { + const months = fs.readdirSync(`${POSTS_PATH}/${year}`) + months.forEach((month) => { + const days = fs.readdirSync(`${POSTS_PATH}/${year}/${month}`) + days.forEach((day) => { + const files = fs.readdirSync(`${POSTS_PATH}/${year}/${month}/${day}`) + files.forEach((file) => { + const title = file.substr(0, file.lastIndexOf('.')) + const route = `/kronika/${year}/${month}/${day}/${name}` + const fsRoute = `${POSTS_PATH}/${year}/${month}/${day}/${file}` + routesArray.push({ + year, + month, + day, + title, + file, + fsRoute, + route + }) + }) + }) + }) + }) + } + finally { + console.log(routesArray) + return routesArray + } +} + +function createRoutesArray() { + let posts = getPosts() + return posts.map(post => post.route) +} + +createRoutesArray() + +module.exports = { + getPosts, + createRoutesArray +} \ No newline at end of file diff --git a/netlify.toml b/netlify.toml index 3a88ace..080dfa8 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,4 +1,4 @@ [build] publish = "dist/" -command = "npm run generate" \ No newline at end of file +command = "npm run build" \ No newline at end of file diff --git a/nuxt.config.js b/nuxt.config.js index a0ae413..caccc2b 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -1,3 +1,5 @@ +import { createRoutesArray } from './api/api.js' + export default { mode: 'universal', /* @@ -31,6 +33,9 @@ export default { } ] }, + generate: { + routes: createRoutesArray + }, /* ** Customize the progress-bar color */ @@ -67,6 +72,6 @@ export default { /* ** You can extend webpack config here */ - extend(config, ctx) {} + extend(config, ctx) { } } } diff --git a/package.json b/package.json index 0237ed5..722d911 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,9 @@ "private": true, "scripts": { "dev": "nuxt", - "build": "nuxt build", + "prebuild": "git clone https://github.com/19pdh/kronika && rm -rf kronika/.git", + "build": "nuxt generate", "start": "nuxt start", - "generate": "nuxt generate", "test": "jest" }, "dependencies": { @@ -43,4 +43,4 @@ "jest-serializer-vue" ] } -} +} \ No newline at end of file -- cgit 1.4.1 From 5855198867cc0586b71b6d64f4581dffc7fe6cbb Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Fri, 11 Oct 2019 19:33:24 +0200 Subject: Add api endpoint --- api/api.js | 1 - netlify.toml | 7 ++++++- package.json | 3 ++- scripts/generateApi.js | 13 +++++++++++++ scripts/postbuild.sh | 6 ++++++ scripts/prebuild.sh | 12 ++++++++++++ 6 files changed, 39 insertions(+), 3 deletions(-) create mode 100755 scripts/generateApi.js create mode 100755 scripts/postbuild.sh create mode 100755 scripts/prebuild.sh diff --git a/api/api.js b/api/api.js index f0d3894..34a53a0 100644 --- a/api/api.js +++ b/api/api.js @@ -31,7 +31,6 @@ function getPosts() { }) } finally { - console.log(routesArray) return routesArray } } diff --git a/netlify.toml b/netlify.toml index 080dfa8..5c94b41 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,4 +1,9 @@ [build] publish = "dist/" -command = "npm run build" \ No newline at end of file +command = "npm run build" + +[[redirects]] + from = "/api/posts" + to = "/api/posts.json" + status = 200 \ No newline at end of file diff --git a/package.json b/package.json index 722d911..e99735d 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,9 @@ "private": true, "scripts": { "dev": "nuxt", - "prebuild": "git clone https://github.com/19pdh/kronika && rm -rf kronika/.git", + "prebuild": "./scripts/prebuild.sh", "build": "nuxt generate", + "postbuild": "./scripts/postbuild.sh", "start": "nuxt start", "test": "jest" }, diff --git a/scripts/generateApi.js b/scripts/generateApi.js new file mode 100755 index 0000000..f439252 --- /dev/null +++ b/scripts/generateApi.js @@ -0,0 +1,13 @@ +let { getPosts } = require('../api/api') + +let posts = getPosts() + +posts = posts.map(({ year, month, day, title, route }) => { + return { + date: `${year}-${month}-${day}`, + title, + route + } +}) + +console.log(posts) \ No newline at end of file diff --git a/scripts/postbuild.sh b/scripts/postbuild.sh new file mode 100755 index 0000000..6a0d1df --- /dev/null +++ b/scripts/postbuild.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +mkdir ./dist/api + +node ./script/generateApi.js > ./dist/api/posts.json + diff --git a/scripts/prebuild.sh b/scripts/prebuild.sh new file mode 100755 index 0000000..22d8e00 --- /dev/null +++ b/scripts/prebuild.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -x +set -eou pipefail + +if [ -d ./kronika ]; then + cd kronika + git pull + cd .. +else + git clone https://github.com/19pdh/kronika +fi -- cgit 1.4.1 From c29fcbdf765e36023985996334ad711f4bc2b6fa Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Fri, 11 Oct 2019 19:35:27 +0200 Subject: Fix typo --- scripts/postbuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/postbuild.sh b/scripts/postbuild.sh index 6a0d1df..53a1702 100755 --- a/scripts/postbuild.sh +++ b/scripts/postbuild.sh @@ -2,5 +2,5 @@ mkdir ./dist/api -node ./script/generateApi.js > ./dist/api/posts.json +node ./scripts/generateApi.js > ./dist/api/posts.json -- cgit 1.4.1 From 293388bf6c338fb5a2bc2d05ff526750f28bb4bc Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Fri, 11 Oct 2019 20:25:43 +0200 Subject: Add attribute parsing --- api/api.js | 16 +++++++++++++--- package-lock.json | 10 +++++++++- package.json | 7 ++++--- scripts/generateApi.js | 8 ++++++-- scripts/postbuild.sh | 2 +- 5 files changed, 33 insertions(+), 10 deletions(-) diff --git a/api/api.js b/api/api.js index 34a53a0..a704912 100644 --- a/api/api.js +++ b/api/api.js @@ -1,7 +1,15 @@ const fs = require('fs') +const frontmatter = require('front-matter') const POSTS_PATH = './kronika/wpisy' +function getPostAttributes(filePath) { + const fileContent = fs.readFileSync(filePath, "utf-8") + + const post = frontmatter(fileContent); + return post.attributes +} + function getPosts() { const routesArray = [] try { @@ -14,13 +22,17 @@ function getPosts() { const files = fs.readdirSync(`${POSTS_PATH}/${year}/${month}/${day}`) files.forEach((file) => { const title = file.substr(0, file.lastIndexOf('.')) - const route = `/kronika/${year}/${month}/${day}/${name}` + const route = `/kronika/${year}/${month}/${day}/${title}` const fsRoute = `${POSTS_PATH}/${year}/${month}/${day}/${file}` + + const attributes = getPostAttributes(fsRoute) + routesArray.push({ year, month, day, title, + attributes, file, fsRoute, route @@ -40,8 +52,6 @@ function createRoutesArray() { return posts.map(post => post.route) } -createRoutesArray() - module.exports = { getPosts, createRoutesArray diff --git a/package-lock.json b/package-lock.json index 538b1bb..18ec963 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "puszcza", + "name": "Puszcza", "version": "1.0.0", "lockfileVersion": 1, "requires": true, @@ -5334,6 +5334,14 @@ } } }, + "front-matter": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-3.0.2.tgz", + "integrity": "sha512-iBGZaWyzqgsrPGsqrXZP6N4hp5FzSKDi18nfAoYpgz3qK5sAwFv/ojmn3VS60SOgLvq6CtojNqy0y6ZNz05IzQ==", + "requires": { + "js-yaml": "^3.13.1" + } + }, "fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", diff --git a/package.json b/package.json index e99735d..f85c87c 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,10 @@ "test": "jest" }, "dependencies": { - "nuxt": "^2.0.0", "@nuxtjs/axios": "^5.3.6", - "@nuxtjs/pwa": "^3.0.0-0" + "@nuxtjs/pwa": "^3.0.0-0", + "front-matter": "^3.0.2", + "nuxt": "^2.0.0" }, "devDependencies": { "@vue/test-utils": "^1.0.0-beta.27", @@ -44,4 +45,4 @@ "jest-serializer-vue" ] } -} \ No newline at end of file +} diff --git a/scripts/generateApi.js b/scripts/generateApi.js index f439252..82bd583 100755 --- a/scripts/generateApi.js +++ b/scripts/generateApi.js @@ -1,13 +1,17 @@ +const fs = require('fs') + let { getPosts } = require('../api/api') let posts = getPosts() -posts = posts.map(({ year, month, day, title, route }) => { +posts = posts.map(({ year, month, day, title, attributes, route }) => { return { date: `${year}-${month}-${day}`, title, + attributes, route } }) -console.log(posts) \ No newline at end of file +fs.writeFile('./dist/api/posts.json', JSON.stringify(posts), (err) => err ? console.log(err) : null) +console.log(posts) diff --git a/scripts/postbuild.sh b/scripts/postbuild.sh index 53a1702..749bfdd 100755 --- a/scripts/postbuild.sh +++ b/scripts/postbuild.sh @@ -2,5 +2,5 @@ mkdir ./dist/api -node ./scripts/generateApi.js > ./dist/api/posts.json +node ./scripts/generateApi.js -- cgit 1.4.1 From 7fc483aa8cedbaeeef2a8ad0d2dbee5a9f73ac86 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Fri, 11 Oct 2019 20:52:24 +0200 Subject: Fix markdown displaying --- nuxt.config.js | 7 ++++++- package-lock.json | 45 ++++++++++++++++++++++++++++++++++++++++++--- package.json | 4 +++- scripts/generateApi.js | 2 ++ 4 files changed, 53 insertions(+), 5 deletions(-) diff --git a/nuxt.config.js b/nuxt.config.js index caccc2b..abc71cb 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -72,6 +72,11 @@ export default { /* ** You can extend webpack config here */ - extend(config, ctx) { } + extend(config, ctx) { + config.module.rules.push({ + test: /\.md$/, + use: ['raw-loader'] + }) + } } } diff --git a/package-lock.json b/package-lock.json index 18ec963..dd84376 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5504,9 +5504,9 @@ "integrity": "sha512-CuGRGMNnCp8RJ70zeoTX37sX4ctoT8BpmkStI2TYQwBBtWzQQFXQ/jsBUCqd34grt3IJQ+hkUXAU84/IuErVLQ==" }, "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.3.tgz", + "integrity": "sha512-B0W4A2U1ww3q7VVthTKfh+epHx+q4mCt6iK+zEAzbMBpWQAwxCeKxEGpj/1oQTpzPXDNSOG7hmG14TsISH50yw==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -7624,6 +7624,14 @@ "type-check": "~0.3.2" } }, + "linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "requires": { + "uc.micro": "^1.0.1" + } + }, "load-bmfont": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/load-bmfont/-/load-bmfont-1.4.0.tgz", @@ -7815,6 +7823,18 @@ "object-visit": "^1.0.0" } }, + "markdown-it": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "requires": { + "argparse": "^1.0.7", + "entities": "~2.0.0", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + } + }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -7830,6 +7850,11 @@ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==" }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -10041,6 +10066,15 @@ } } }, + "raw-loader": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-3.1.0.tgz", + "integrity": "sha512-lzUVMuJ06HF4rYveaz9Tv0WRlUMxJ0Y1hgSkkgg+50iEdaI0TthyEDe08KIHb0XsF6rn8WYTqPCaGTZg3sX+qA==", + "requires": { + "loader-utils": "^1.1.0", + "schema-utils": "^2.0.1" + } + }, "react-is": { "version": "16.9.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.9.0.tgz", @@ -11570,6 +11604,11 @@ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.20.tgz", "integrity": "sha512-8OaIKfzL5cpx8eCMAhhvTlft8GYF8b2eQr6JkCyVdrgjcytyOmPCXrqXFcUnhonRpLlh5yxEZVohm6mzaowUOw==" }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" + }, "uglify-js": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", diff --git a/package.json b/package.json index f85c87c..3c4543f 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,9 @@ "@nuxtjs/axios": "^5.3.6", "@nuxtjs/pwa": "^3.0.0-0", "front-matter": "^3.0.2", - "nuxt": "^2.0.0" + "markdown-it": "^10.0.0", + "nuxt": "^2.0.0", + "raw-loader": "^3.1.0" }, "devDependencies": { "@vue/test-utils": "^1.0.0-beta.27", diff --git a/scripts/generateApi.js b/scripts/generateApi.js index 82bd583..27af063 100755 --- a/scripts/generateApi.js +++ b/scripts/generateApi.js @@ -13,5 +13,7 @@ posts = posts.map(({ year, month, day, title, attributes, route }) => { } }) +posts.sort((a, b) => (a.route > b.route ? 1 : -1)) + fs.writeFile('./dist/api/posts.json', JSON.stringify(posts), (err) => err ? console.log(err) : null) console.log(posts) -- cgit 1.4.1 From 7a17a28220a84c294728f572932b1619d92c1d95 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 12 Oct 2019 10:41:00 +0200 Subject: Add error logging --- nuxt.config.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nuxt.config.js b/nuxt.config.js index abc71cb..a98a7c7 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -78,5 +78,14 @@ export default { use: ['raw-loader'] }) } + }, + hooks: { + generate: { + routeCreated({ route, path, errors }) { + console.log(route) + console.log(path) + console.log(errors) + } + } } } -- cgit 1.4.1 From d92f1a2a1bac3039434a16c504cc1d54c6d0409a Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 12 Oct 2019 15:40:51 +0200 Subject: Change posts location --- .gitignore | 2 +- api/api.js | 21 ++++---- nuxt.config.js | 2 +- pages/kronika/_year/_month/_day/_title/index.vue | 65 ++++++++++++++++++++++++ scripts/prebuild.sh | 6 +-- 5 files changed, 80 insertions(+), 16 deletions(-) create mode 100644 pages/kronika/_year/_month/_day/_title/index.vue diff --git a/.gitignore b/.gitignore index 83c10f2..53c3292 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -kronika +content # Created by .ignore support plugin (hsz.mobi) ### Node template diff --git a/api/api.js b/api/api.js index a704912..1675d7e 100644 --- a/api/api.js +++ b/api/api.js @@ -1,12 +1,12 @@ const fs = require('fs') const frontmatter = require('front-matter') -const POSTS_PATH = './kronika/wpisy' +const POSTS_PATH = './content/wpisy' function getPostAttributes(filePath) { - const fileContent = fs.readFileSync(filePath, "utf-8") + const fileContent = fs.readFileSync(filePath, 'utf-8') - const post = frontmatter(fileContent); + const post = frontmatter(fileContent) return post.attributes } @@ -14,15 +14,15 @@ function getPosts() { const routesArray = [] try { const years = fs.readdirSync(`${POSTS_PATH}`) - years.forEach((year) => { + years.forEach(year => { const months = fs.readdirSync(`${POSTS_PATH}/${year}`) - months.forEach((month) => { + months.forEach(month => { const days = fs.readdirSync(`${POSTS_PATH}/${year}/${month}`) - days.forEach((day) => { + days.forEach(day => { const files = fs.readdirSync(`${POSTS_PATH}/${year}/${month}/${day}`) - files.forEach((file) => { + files.forEach(file => { const title = file.substr(0, file.lastIndexOf('.')) - const route = `/kronika/${year}/${month}/${day}/${title}` + const route = `/kronika/${year}/${month}/${day}/${title}/` const fsRoute = `${POSTS_PATH}/${year}/${month}/${day}/${file}` const attributes = getPostAttributes(fsRoute) @@ -41,8 +41,7 @@ function getPosts() { }) }) }) - } - finally { + } finally { return routesArray } } @@ -55,4 +54,4 @@ function createRoutesArray() { module.exports = { getPosts, createRoutesArray -} \ No newline at end of file +} diff --git a/nuxt.config.js b/nuxt.config.js index a98a7c7..7f66b21 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -34,7 +34,7 @@ export default { ] }, generate: { - routes: createRoutesArray + routes: createRoutesArray() }, /* ** Customize the progress-bar color diff --git a/pages/kronika/_year/_month/_day/_title/index.vue b/pages/kronika/_year/_month/_day/_title/index.vue new file mode 100644 index 0000000..1148f61 --- /dev/null +++ b/pages/kronika/_year/_month/_day/_title/index.vue @@ -0,0 +1,65 @@ + + + + + \ No newline at end of file diff --git a/scripts/prebuild.sh b/scripts/prebuild.sh index 22d8e00..937bf5f 100755 --- a/scripts/prebuild.sh +++ b/scripts/prebuild.sh @@ -3,10 +3,10 @@ set -x set -eou pipefail -if [ -d ./kronika ]; then - cd kronika +if [ -d ./content ]; then + cd content git pull cd .. else - git clone https://github.com/19pdh/kronika + git clone https://github.com/19pdh/kronika content fi -- cgit 1.4.1 From 5cfbd5b71d149419b0b80056e652ca94d26f1a95 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 12 Oct 2019 16:54:05 +0200 Subject: Move to single api --- api/api.js | 22 +- nuxt.config.js | 10 +- package-lock.json | 362 ++++++++++++----------- package.json | 1 + pages/kronika/_year/_month/_day/_title/index.vue | 8 +- scripts/generateApi.js | 18 +- 6 files changed, 233 insertions(+), 188 deletions(-) diff --git a/api/api.js b/api/api.js index 1675d7e..9603f3f 100644 --- a/api/api.js +++ b/api/api.js @@ -1,13 +1,20 @@ const fs = require('fs') const frontmatter = require('front-matter') +const md = require('markdown-it')() +const { JSDOM } = require('jsdom') const POSTS_PATH = './content/wpisy' -function getPostAttributes(filePath) { - const fileContent = fs.readFileSync(filePath, 'utf-8') - +function getPostAttributes(fileContent) { const post = frontmatter(fileContent) - return post.attributes + + const { document } = new JSDOM(`${md.render(post.body)}`).window + const element = document.getElementsByTagName('p') + + post.body = `
${md.render(post.body)}
` + post.description = element[1].textContent + + return post } function getPosts() { @@ -25,14 +32,14 @@ function getPosts() { const route = `/kronika/${year}/${month}/${day}/${title}/` const fsRoute = `${POSTS_PATH}/${year}/${month}/${day}/${file}` - const attributes = getPostAttributes(fsRoute) + const data = getPostAttributes(fs.readFileSync(fsRoute, 'utf-8')) routesArray.push({ year, month, day, title, - attributes, + data, file, fsRoute, route @@ -53,5 +60,6 @@ function createRoutesArray() { module.exports = { getPosts, - createRoutesArray + createRoutesArray, + getPostAttributes } diff --git a/nuxt.config.js b/nuxt.config.js index 7f66b21..016f39f 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -72,7 +72,15 @@ export default { /* ** You can extend webpack config here */ - extend(config, ctx) { + extend(config, { isDev, isClient }) { + if (isClient) { + config.node = { + fs: 'empty', + child_process: 'empty', + tls: 'empty', + net: 'empty' + } + } config.module.rules.push({ test: /\.md$/, use: ['raw-loader'] diff --git a/package-lock.json b/package-lock.json index dd84376..1609932 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2276,10 +2276,9 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, "abab": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.1.tgz", - "integrity": "sha512-1zSbbCuoIjafKZ3mblY5ikvAb0ODUbqBnFuUb7f6uLeQhhGJ0vEV4ntmtxKLT2WgXCO94E07BjunsIw1jOMPZw==", - "dev": true + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.2.tgz", + "integrity": "sha512-2scffjvioEmNz0OyDSLGWDfKCVwaKc6l9Pm9kOIREU13ClXZvHpg/nRL5xyjSSSLhOnXqft2HpsAzNEEA8cFFg==" }, "abbrev": { "version": "1.1.1", @@ -2302,10 +2301,9 @@ "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==" }, "acorn-globals": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.3.tgz", - "integrity": "sha512-vkR40VwS2SYO98AIeFvzWWh+xyc2qi9s7OoXSFEGIP/rOJKzjnhykaZJNnHdoq4BL2gGxI5EZOU16z896EYnOQ==", - "dev": true, + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz", + "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==", "requires": { "acorn": "^6.0.1", "acorn-walk": "^6.0.1" @@ -2445,8 +2443,7 @@ "array-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", - "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", - "dev": true + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=" }, "array-flatten": { "version": "1.1.1", @@ -2462,7 +2459,6 @@ "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, "requires": { "safer-buffer": "~2.1.0" } @@ -2504,8 +2500,7 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, "assign-symbols": { "version": "1.0.0", @@ -2531,8 +2526,7 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "atob": { "version": "2.1.2", @@ -2556,14 +2550,12 @@ "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, "axios": { "version": "0.19.0", @@ -2874,7 +2866,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, "requires": { "tweetnacl": "^0.14.3" } @@ -3040,8 +3031,7 @@ "browser-process-hrtime": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz", - "integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==", - "dev": true + "integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==" }, "browser-resolve": { "version": "1.11.3", @@ -3369,8 +3359,7 @@ "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "chalk": { "version": "2.4.2", @@ -3596,7 +3585,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -4196,14 +4184,12 @@ "cssom": { "version": "0.3.8", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" }, "cssstyle": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz", "integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==", - "dev": true, "requires": { "cssom": "0.3.x" } @@ -4222,7 +4208,6 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -4231,24 +4216,10 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz", "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==", - "dev": true, "requires": { "abab": "^2.0.0", "whatwg-mimetype": "^2.2.0", "whatwg-url": "^7.0.0" - }, - "dependencies": { - "whatwg-url": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", - "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", - "dev": true, - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - } } }, "date-now": { @@ -4283,8 +4254,7 @@ "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" }, "deepmerge": { "version": "4.0.0", @@ -4344,8 +4314,7 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "depd": { "version": "1.1.2", @@ -4442,7 +4411,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==", - "dev": true, "requires": { "webidl-conversions": "^4.0.2" } @@ -4516,7 +4484,6 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, "requires": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -4688,7 +4655,6 @@ "version": "1.12.0", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.12.0.tgz", "integrity": "sha512-TuA+EhsanGcme5T3R0L80u4t8CpbXQjegRmf7+FPTJrtCTErXFeelblRgHQa1FofEzqYYJmJ/OqjTwREp9qgmg==", - "dev": true, "requires": { "esprima": "^3.1.3", "estraverse": "^4.2.0", @@ -4700,14 +4666,12 @@ "esprima": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "optional": true } } @@ -4945,8 +4909,7 @@ "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "extend-shallow": { "version": "3.0.2", @@ -5073,8 +5036,7 @@ "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { "version": "2.0.1", @@ -5095,8 +5057,7 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, "fb-watchman": { "version": "2.0.0", @@ -5269,14 +5230,12 @@ "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -5432,7 +5391,6 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -5526,14 +5484,12 @@ "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "dev": true, "requires": { "ajv": "^6.5.5", "har-schema": "^2.0.0" @@ -5703,7 +5659,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", - "dev": true, "requires": { "whatwg-encoding": "^1.0.1" } @@ -5866,7 +5821,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, "requires": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -5992,6 +5946,11 @@ "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" }, + "ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" + }, "ipaddr.js": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", @@ -6235,8 +6194,7 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "is-whitespace": { "version": "0.3.0", @@ -6272,8 +6230,7 @@ "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "istanbul-lib-coverage": { "version": "2.0.5", @@ -6480,6 +6437,84 @@ "jest-mock": "^24.9.0", "jest-util": "^24.9.0", "jsdom": "^11.5.1" + }, + "dependencies": { + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "dev": true + }, + "jsdom": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", + "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", + "dev": true, + "requires": { + "abab": "^2.0.0", + "acorn": "^5.5.3", + "acorn-globals": "^4.1.0", + "array-equal": "^1.0.0", + "cssom": ">= 0.3.2 < 0.4.0", + "cssstyle": "^1.0.0", + "data-urls": "^1.0.0", + "domexception": "^1.0.1", + "escodegen": "^1.9.1", + "html-encoding-sniffer": "^1.0.2", + "left-pad": "^1.3.0", + "nwsapi": "^2.0.7", + "parse5": "4.0.0", + "pn": "^1.1.0", + "request": "^2.87.0", + "request-promise-native": "^1.0.5", + "sax": "^1.2.4", + "symbol-tree": "^3.2.2", + "tough-cookie": "^2.3.4", + "w3c-hr-time": "^1.0.1", + "webidl-conversions": "^4.0.2", + "whatwg-encoding": "^1.0.3", + "whatwg-mimetype": "^2.1.0", + "whatwg-url": "^6.4.1", + "ws": "^5.2.0", + "xml-name-validator": "^3.0.0" + } + }, + "parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "dev": true + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "whatwg-url": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", + "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "ws": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + } } }, "jest-environment-node": { @@ -7443,56 +7478,47 @@ "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "jsdom": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", - "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", - "dev": true, + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-15.1.1.tgz", + "integrity": "sha512-cQZRBB33arrDAeCrAEWn1U3SvrvC8XysBua9Oqg1yWrsY/gYcusloJC3RZJXuY5eehSCmws8f2YeliCqGSkrtQ==", "requires": { "abab": "^2.0.0", - "acorn": "^5.5.3", - "acorn-globals": "^4.1.0", + "acorn": "^6.1.1", + "acorn-globals": "^4.3.2", "array-equal": "^1.0.0", - "cssom": ">= 0.3.2 < 0.4.0", - "cssstyle": "^1.0.0", - "data-urls": "^1.0.0", + "cssom": "^0.3.6", + "cssstyle": "^1.2.2", + "data-urls": "^1.1.0", "domexception": "^1.0.1", - "escodegen": "^1.9.1", + "escodegen": "^1.11.1", "html-encoding-sniffer": "^1.0.2", - "left-pad": "^1.3.0", - "nwsapi": "^2.0.7", - "parse5": "4.0.0", + "nwsapi": "^2.1.4", + "parse5": "5.1.0", "pn": "^1.1.0", - "request": "^2.87.0", - "request-promise-native": "^1.0.5", - "sax": "^1.2.4", + "request": "^2.88.0", + "request-promise-native": "^1.0.7", + "saxes": "^3.1.9", "symbol-tree": "^3.2.2", - "tough-cookie": "^2.3.4", + "tough-cookie": "^3.0.1", "w3c-hr-time": "^1.0.1", + "w3c-xmlserializer": "^1.1.2", "webidl-conversions": "^4.0.2", - "whatwg-encoding": "^1.0.3", - "whatwg-mimetype": "^2.1.0", - "whatwg-url": "^6.4.1", - "ws": "^5.2.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^7.0.0", + "ws": "^7.0.0", "xml-name-validator": "^3.0.0" }, "dependencies": { - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true - }, "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", - "dev": true, + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.1.2.tgz", + "integrity": "sha512-gftXq3XI81cJCgkUiAVixA0raD9IVmXqsylCrjRygw4+UOOGzPoxnQ6r/CnVL9i+mDncJo94tSkyrtuuQVBmrg==", "requires": { - "async-limiter": "~1.0.0" + "async-limiter": "^1.0.0" } } } @@ -7510,8 +7536,7 @@ "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, "json-schema-traverse": { "version": "0.4.1", @@ -7521,8 +7546,7 @@ "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json5": { "version": "2.1.0", @@ -7551,7 +7575,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -7618,7 +7641,6 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, "requires": { "prelude-ls": "~1.1.2", "type-check": "~0.3.2" @@ -7729,8 +7751,7 @@ "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", - "dev": true + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" }, "lodash.template": { "version": "4.5.0", @@ -8332,14 +8353,12 @@ "nwsapi": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.4.tgz", - "integrity": "sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw==", - "dev": true + "integrity": "sha512-iGfd9Y6SFdTNldEy2L0GUhcarIutFmk+MPWIn9dmj8NMIup03G08uUF2KGbbmv/Ux4RT0VZJoP/sVbWA6d/VIw==" }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" }, "object-assign": { "version": "4.1.1", @@ -8488,7 +8507,6 @@ "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, "requires": { "deep-is": "~0.1.3", "fast-levenshtein": "~2.0.4", @@ -8501,8 +8519,7 @@ "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" } } }, @@ -8672,10 +8689,9 @@ } }, "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", - "dev": true + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz", + "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==" }, "parseurl": { "version": "1.3.3", @@ -8754,8 +8770,7 @@ "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "phin": { "version": "2.9.3", @@ -8800,8 +8815,7 @@ "pn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", - "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", - "dev": true + "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==" }, "pngjs": { "version": "3.4.0", @@ -9785,8 +9799,7 @@ "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" }, "prepend-http": { "version": "1.0.4", @@ -9929,8 +9942,7 @@ "psl": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz", - "integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==", - "dev": true + "integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==" }, "public-encrypt": { "version": "4.0.3", @@ -10288,7 +10300,6 @@ "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -10315,20 +10326,17 @@ "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, "requires": { "psl": "^1.1.24", "punycode": "^1.4.1" @@ -10340,7 +10348,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", - "dev": true, "requires": { "lodash": "^4.17.11" } @@ -10349,11 +10356,21 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", - "dev": true, "requires": { "request-promise-core": "1.1.2", "stealthy-require": "^1.1.1", "tough-cookie": "^2.3.3" + }, + "dependencies": { + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } } }, "require-directory": { @@ -10518,6 +10535,14 @@ "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, + "saxes": { + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.11.tgz", + "integrity": "sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g==", + "requires": { + "xmlchars": "^2.1.1" + } + }, "schema-utils": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.1.0.tgz", @@ -10926,7 +10951,6 @@ "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -11003,8 +11027,7 @@ "stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", - "dev": true + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" }, "stream-browserify": { "version": "2.0.2", @@ -11262,8 +11285,7 @@ "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" }, "tapable": { "version": "1.1.3", @@ -11484,11 +11506,11 @@ "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=" }, "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", + "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", "requires": { + "ip-regex": "^2.1.0", "psl": "^1.1.28", "punycode": "^2.1.1" } @@ -11497,7 +11519,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", - "dev": true, "requires": { "punycode": "^2.1.0" } @@ -11560,7 +11581,6 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, "requires": { "safe-buffer": "^5.0.1" } @@ -11568,14 +11588,12 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, "requires": { "prelude-ls": "~1.1.2" } @@ -11879,7 +11897,6 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -12105,11 +12122,20 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", "integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=", - "dev": true, "requires": { "browser-process-hrtime": "^0.1.2" } }, + "w3c-xmlserializer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz", + "integrity": "sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg==", + "requires": { + "domexception": "^1.0.1", + "webidl-conversions": "^4.0.2", + "xml-name-validator": "^3.0.0" + } + }, "walker": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", @@ -12717,8 +12743,7 @@ "webidl-conversions": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==" }, "webpack": { "version": "4.39.3", @@ -12908,7 +12933,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", - "dev": true, "requires": { "iconv-lite": "0.4.24" } @@ -12916,14 +12940,12 @@ "whatwg-mimetype": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==" }, "whatwg-url": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", - "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", - "dev": true, + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", + "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", "requires": { "lodash.sortby": "^4.7.0", "tr46": "^1.0.1", @@ -13077,8 +13099,7 @@ "xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==" }, "xml-parse-from-string": { "version": "1.0.1", @@ -13099,6 +13120,11 @@ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index 3c4543f..5e9991c 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@nuxtjs/axios": "^5.3.6", "@nuxtjs/pwa": "^3.0.0-0", "front-matter": "^3.0.2", + "jsdom": "^15.1.1", "markdown-it": "^10.0.0", "nuxt": "^2.0.0", "raw-loader": "^3.1.0" diff --git a/pages/kronika/_year/_month/_day/_title/index.vue b/pages/kronika/_year/_month/_day/_title/index.vue index 1148f61..f4d5cc0 100644 --- a/pages/kronika/_year/_month/_day/_title/index.vue +++ b/pages/kronika/_year/_month/_day/_title/index.vue @@ -15,10 +15,10 @@ \ No newline at end of file -- cgit 1.4.1 From 61dfb8f8e6aa261c3743ef7315a5358cb8867ab9 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Thu, 17 Oct 2019 21:31:00 +0200 Subject: Fix nav links position --- components/NavBar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/NavBar.vue b/components/NavBar.vue index d41ca20..2887464 100644 --- a/components/NavBar.vue +++ b/components/NavBar.vue @@ -161,7 +161,7 @@ export default { display: flex !important; flex-direction: column; justify-content: center; - align-items: start; + align-items: flex-start; margin-bottom: 0; padding: 50px 10px; -- cgit 1.4.1 From 5cbfdab567005a963ef3c4f1ee4f1412f9c0de47 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Thu, 17 Oct 2019 21:56:13 +0200 Subject: Fix empty post list --- components/NavBar.vue | 14 +++++++++++--- components/NavLink.vue | 4 +++- layouts/default.vue | 8 ++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/components/NavBar.vue b/components/NavBar.vue index 2887464..4ffdf16 100644 --- a/components/NavBar.vue +++ b/components/NavBar.vue @@ -8,14 +8,21 @@
    - + + + external + />
@@ -30,6 +37,7 @@ export default { props: { routes: Array, externalRoutes: Array, + staticRoutes: Array, title: String, logo: String }, diff --git a/components/NavLink.vue b/components/NavLink.vue index 253dde9..6074db0 100644 --- a/components/NavLink.vue +++ b/components/NavLink.vue @@ -1,6 +1,7 @@ @@ -10,7 +11,8 @@ export default { props: { link: String, name: String, - external: { type: Boolean, default: false } + external: { type: Boolean, default: false }, + static: { type: Boolean, default: false } } } diff --git a/layouts/default.vue b/layouts/default.vue index 3341547..7f9ec5b 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -2,11 +2,11 @@
- +
@@ -23,9 +23,9 @@ export default { routes: [ { path: '/', name: 'Strona główna' }, { path: '/download', name: 'Do pobrania' }, - { path: '/kontakt', name: 'Kontakt' }, - { path: '/kronika', name: 'Kronika' } + { path: '/kontakt', name: 'Kontakt' } ], + staticRoutes: [{ path: '/kronika', name: 'Kronika' }], externalRoutes: [ // { // path: 'https://kronika-puszcza.netlify.com', -- cgit 1.4.1 From ab22672cb9911b7dda59acc4557237b835926816 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 19 Oct 2019 13:49:25 +0200 Subject: Add style to list of posts --- components/ChroniclePost.vue | 60 ++++++++++++++++++++++++ layouts/default.vue | 5 +- pages/kronika/_year/_month/_day/_title/index.vue | 2 +- pages/kronika/index.vue | 40 +++++++++++++++- 4 files changed, 102 insertions(+), 5 deletions(-) create mode 100644 components/ChroniclePost.vue diff --git a/components/ChroniclePost.vue b/components/ChroniclePost.vue new file mode 100644 index 0000000..7b2c527 --- /dev/null +++ b/components/ChroniclePost.vue @@ -0,0 +1,60 @@ + + + + + \ No newline at end of file diff --git a/layouts/default.vue b/layouts/default.vue index 7f9ec5b..496f1ba 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -23,9 +23,10 @@ export default { routes: [ { path: '/', name: 'Strona główna' }, { path: '/download', name: 'Do pobrania' }, - { path: '/kontakt', name: 'Kontakt' } + { path: '/kontakt', name: 'Kontakt' }, + { path: '/kronika', name: 'Kronika' } ], - staticRoutes: [{ path: '/kronika', name: 'Kronika' }], + staticRoutes: [], externalRoutes: [ // { // path: 'https://kronika-puszcza.netlify.com', diff --git a/pages/kronika/_year/_month/_day/_title/index.vue b/pages/kronika/_year/_month/_day/_title/index.vue index 361b7f8..1308eb7 100644 --- a/pages/kronika/_year/_month/_day/_title/index.vue +++ b/pages/kronika/_year/_month/_day/_title/index.vue @@ -7,7 +7,7 @@
-
+
diff --git a/pages/kronika/index.vue b/pages/kronika/index.vue index 4bb6910..f61e615 100644 --- a/pages/kronika/index.vue +++ b/pages/kronika/index.vue @@ -1,18 +1,54 @@ \ No newline at end of file + + + \ No newline at end of file -- cgit 1.4.1 From 6ba5b9968348d0370722972e2763167a8785d8c6 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 19 Oct 2019 14:01:30 +0200 Subject: Fix request path --- pages/kronika/index.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pages/kronika/index.vue b/pages/kronika/index.vue index f61e615..13322f4 100644 --- a/pages/kronika/index.vue +++ b/pages/kronika/index.vue @@ -17,8 +17,6 @@ import ChroniclePost from '~/components/ChroniclePost' import k from '~/api' -const URL = process.env.DEPLOY_URL || 'http://localhost:8080' - export default { components: { ChroniclePost @@ -34,9 +32,7 @@ export default { methods: { getPosts() { if (this.posts.length < 1) { - this.$axios - .get(`${URL}/api/posts.json`) - .then(r => (this.posts = r.data)) + this.$axios.get(`/api/posts.json`).then(r => (this.posts = r.data)) } console.log(this.posts) } -- cgit 1.4.1 From c52f0ac6ce79a8e1f4342219ad3651b9966b78b2 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 19 Oct 2019 14:20:13 +0200 Subject: Add baseUrl --- nuxt.config.js | 3 +++ pages/kronika/index.vue | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nuxt.config.js b/nuxt.config.js index 036135b..44a1de3 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -40,6 +40,9 @@ export default { } ] }, + env: { + baseUrl: process.env.DEPLOY_URL || 'http://localhost:3000' + }, generate: { routes: k.getPosts().map(post => post.route) }, diff --git a/pages/kronika/index.vue b/pages/kronika/index.vue index 13322f4..20341e9 100644 --- a/pages/kronika/index.vue +++ b/pages/kronika/index.vue @@ -32,7 +32,9 @@ export default { methods: { getPosts() { if (this.posts.length < 1) { - this.$axios.get(`/api/posts.json`).then(r => (this.posts = r.data)) + this.$axios + .get(`${process.env.baseUrl}/api/posts.json`) + .then(r => (this.posts = r.data)) } console.log(this.posts) } -- cgit 1.4.1 From 8a96114451118450d005566e273cd1c28500ff94 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 19 Oct 2019 23:17:25 +0200 Subject: Switch to prime url --- nuxt.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuxt.config.js b/nuxt.config.js index 44a1de3..4ade6f8 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -1,6 +1,6 @@ import k from './api' -const BASE_URL = process.env.DEPLOY_URL || 'http://localhost:3000' +const BASE_URL = process.env.DEPLOY_PRIME_URL || 'http://localhost:3000' export default { mode: 'universal', -- cgit 1.4.1 From f45bfe218451d1eb29d18e902b4cb5a41ee12529 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 19 Oct 2019 23:24:05 +0200 Subject: Fix relative axios --- pages/kronika/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/kronika/index.vue b/pages/kronika/index.vue index 20341e9..4a89a48 100644 --- a/pages/kronika/index.vue +++ b/pages/kronika/index.vue @@ -33,7 +33,7 @@ export default { getPosts() { if (this.posts.length < 1) { this.$axios - .get(`${process.env.baseUrl}/api/posts.json`) + .get(`${window.location.origin}/api/posts.json`) .then(r => (this.posts = r.data)) } console.log(this.posts) -- cgit 1.4.1 From f99bfd2a3924b91e1138aa14cfe27aadc5ea0b8d Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 19 Oct 2019 23:34:13 +0200 Subject: Update og image --- nuxt.config.js | 2 +- static/assets/og/default.jpg | Bin 0 -> 136365 bytes static/assets/og/default.png | Bin 99818 -> 0 bytes 3 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 static/assets/og/default.jpg delete mode 100644 static/assets/og/default.png diff --git a/nuxt.config.js b/nuxt.config.js index 4ade6f8..e00db35 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -28,7 +28,7 @@ export default { { hid: 'og:image', name: 'og:image', - content: `${BASE_URL}/assets/og/default.png` + content: `${BASE_URL}/assets/og/default.jpg` } ], link: [ diff --git a/static/assets/og/default.jpg b/static/assets/og/default.jpg new file mode 100644 index 0000000..d422270 Binary files /dev/null and b/static/assets/og/default.jpg differ diff --git a/static/assets/og/default.png b/static/assets/og/default.png deleted file mode 100644 index ae66491..0000000 Binary files a/static/assets/og/default.png and /dev/null differ -- cgit 1.4.1 From 73c108daf3d470d6ebea0ba58d2289d4ffabb84e Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 19 Oct 2019 23:44:00 +0200 Subject: Fix navlink font-weight --- components/NavLink.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/NavLink.vue b/components/NavLink.vue index 6074db0..6d72dc7 100644 --- a/components/NavLink.vue +++ b/components/NavLink.vue @@ -24,6 +24,7 @@ export default { font-family: 'Roboto Slab', serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; + font-weight: bold; text-decoration: none; color: #181818; @@ -47,6 +48,12 @@ export default { background-color: #ececec !important; } +@media (min-width: 900px) { + .link { + font-weight: normal; + } +} + @media (max-width: 1300px) { .navlink { margin: 0; -- cgit 1.4.1 From 84a95c8c4ecf5348341502f95250c4588181786d Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sun, 20 Oct 2019 22:19:25 +0200 Subject: Rename static to pure in NavLink --- components/NavBar.vue | 2 +- components/NavLink.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/NavBar.vue b/components/NavBar.vue index 4ffdf16..4bbae72 100644 --- a/components/NavBar.vue +++ b/components/NavBar.vue @@ -14,7 +14,7 @@ :key="route.path" :link="route.path" :name="route.name" - static + pure /> @@ -12,7 +12,7 @@ export default { link: String, name: String, external: { type: Boolean, default: false }, - static: { type: Boolean, default: false } + pure: { type: Boolean, default: false } } } -- cgit 1.4.1 From 058d8ff80bf3b1f1744105f5f10fd6fbbbfbb9b1 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sun, 20 Oct 2019 22:25:48 +0200 Subject: Move to 'tests' --- test/components/FacebookFeed.test.js | 11 ---- test/components/FacebookFindUsButton.test.js | 11 ---- test/components/Footer.test.js | 20 ------- test/components/JoinUs.test.js | 11 ---- test/components/NavBar.test.js | 27 --------- test/components/NavLink.test.js | 23 -------- .../__snapshots__/FacebookFeed.test.js.snap | 13 ----- .../FacebookFindUsButton.test.js.snap | 19 ------- test/components/__snapshots__/Footer.test.js.snap | 66 ---------------------- test/components/__snapshots__/JoinUs.test.js.snap | 31 ---------- test/components/__snapshots__/NavBar.test.js.snap | 40 ------------- test/components/__snapshots__/NavLink.test.js.snap | 14 ----- test/pages/404.test.js | 11 ---- test/pages/__snapshots__/404.test.js.snap | 13 ----- test/pages/__snapshots__/download.test.js.snap | 25 -------- test/pages/__snapshots__/index.test.js.snap | 9 --- test/pages/__snapshots__/kontakt.test.js.snap | 31 ---------- test/pages/__snapshots__/o-nas.test.js.snap | 7 --- test/pages/download.test.js | 11 ---- test/pages/index.test.js | 11 ---- test/pages/kontakt.test.js | 11 ---- test/pages/o-nas.test.js | 11 ---- tests/components/FacebookFeed.test.js | 11 ++++ tests/components/FacebookFindUsButton.test.js | 11 ++++ tests/components/Footer.test.js | 20 +++++++ tests/components/JoinUs.test.js | 11 ++++ tests/components/NavBar.test.js | 27 +++++++++ tests/components/NavLink.test.js | 23 ++++++++ .../__snapshots__/FacebookFeed.test.js.snap | 13 +++++ .../FacebookFindUsButton.test.js.snap | 19 +++++++ tests/components/__snapshots__/Footer.test.js.snap | 66 ++++++++++++++++++++++ tests/components/__snapshots__/JoinUs.test.js.snap | 31 ++++++++++ tests/components/__snapshots__/NavBar.test.js.snap | 40 +++++++++++++ .../components/__snapshots__/NavLink.test.js.snap | 14 +++++ tests/pages/404.test.js | 11 ++++ tests/pages/__snapshots__/404.test.js.snap | 13 +++++ tests/pages/__snapshots__/download.test.js.snap | 25 ++++++++ tests/pages/__snapshots__/index.test.js.snap | 9 +++ tests/pages/__snapshots__/kontakt.test.js.snap | 31 ++++++++++ tests/pages/__snapshots__/o-nas.test.js.snap | 7 +++ tests/pages/download.test.js | 11 ++++ tests/pages/index.test.js | 11 ++++ tests/pages/kontakt.test.js | 11 ++++ tests/pages/o-nas.test.js | 11 ++++ 44 files changed, 426 insertions(+), 426 deletions(-) delete mode 100644 test/components/FacebookFeed.test.js delete mode 100644 test/components/FacebookFindUsButton.test.js delete mode 100644 test/components/Footer.test.js delete mode 100644 test/components/JoinUs.test.js delete mode 100644 test/components/NavBar.test.js delete mode 100644 test/components/NavLink.test.js delete mode 100644 test/components/__snapshots__/FacebookFeed.test.js.snap delete mode 100644 test/components/__snapshots__/FacebookFindUsButton.test.js.snap delete mode 100644 test/components/__snapshots__/Footer.test.js.snap delete mode 100644 test/components/__snapshots__/JoinUs.test.js.snap delete mode 100644 test/components/__snapshots__/NavBar.test.js.snap delete mode 100644 test/components/__snapshots__/NavLink.test.js.snap delete mode 100644 test/pages/404.test.js delete mode 100644 test/pages/__snapshots__/404.test.js.snap delete mode 100644 test/pages/__snapshots__/download.test.js.snap delete mode 100644 test/pages/__snapshots__/index.test.js.snap delete mode 100644 test/pages/__snapshots__/kontakt.test.js.snap delete mode 100644 test/pages/__snapshots__/o-nas.test.js.snap delete mode 100644 test/pages/download.test.js delete mode 100644 test/pages/index.test.js delete mode 100644 test/pages/kontakt.test.js delete mode 100644 test/pages/o-nas.test.js create mode 100644 tests/components/FacebookFeed.test.js create mode 100644 tests/components/FacebookFindUsButton.test.js create mode 100644 tests/components/Footer.test.js create mode 100644 tests/components/JoinUs.test.js create mode 100644 tests/components/NavBar.test.js create mode 100644 tests/components/NavLink.test.js create mode 100644 tests/components/__snapshots__/FacebookFeed.test.js.snap create mode 100644 tests/components/__snapshots__/FacebookFindUsButton.test.js.snap create mode 100644 tests/components/__snapshots__/Footer.test.js.snap create mode 100644 tests/components/__snapshots__/JoinUs.test.js.snap create mode 100644 tests/components/__snapshots__/NavBar.test.js.snap create mode 100644 tests/components/__snapshots__/NavLink.test.js.snap create mode 100644 tests/pages/404.test.js create mode 100644 tests/pages/__snapshots__/404.test.js.snap create mode 100644 tests/pages/__snapshots__/download.test.js.snap create mode 100644 tests/pages/__snapshots__/index.test.js.snap create mode 100644 tests/pages/__snapshots__/kontakt.test.js.snap create mode 100644 tests/pages/__snapshots__/o-nas.test.js.snap create mode 100644 tests/pages/download.test.js create mode 100644 tests/pages/index.test.js create mode 100644 tests/pages/kontakt.test.js create mode 100644 tests/pages/o-nas.test.js diff --git a/test/components/FacebookFeed.test.js b/test/components/FacebookFeed.test.js deleted file mode 100644 index 7abedf6..0000000 --- a/test/components/FacebookFeed.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { shallowMount } from '@vue/test-utils' -import FacebookFeed from '../../components/FacebookFeed' - -describe('FacebookFeed', () => { - // Now mount the component and you have the wrapper - const wrapper = shallowMount(FacebookFeed) - - it('match snapshot', () => { - expect(wrapper.element).toMatchSnapshot() - }) -}) diff --git a/test/components/FacebookFindUsButton.test.js b/test/components/FacebookFindUsButton.test.js deleted file mode 100644 index d74e16f..0000000 --- a/test/components/FacebookFindUsButton.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { shallowMount } from '@vue/test-utils' -import FacebookFindUsButton from '../../components/FacebookFindUsButton' - -describe('FacebookFindUsButton', () => { - // Now mount the component and you have the wrapper - const wrapper = shallowMount(FacebookFindUsButton) - - it('match snapshot', () => { - expect(wrapper.element).toMatchSnapshot() - }) -}) diff --git a/test/components/Footer.test.js b/test/components/Footer.test.js deleted file mode 100644 index e284b5a..0000000 --- a/test/components/Footer.test.js +++ /dev/null @@ -1,20 +0,0 @@ -import { shallowMount } from '@vue/test-utils' -import Footer from '../../components/Footer' - -describe('Footer', () => { - // Now mount the component and you have the wrapper - const wrapper = shallowMount(Footer) - - wrapper.setProps({ - routes: [ - { - path: '/', - name: 'Home' - } - ] - }) - - it('match snapshot', () => { - expect(wrapper.element).toMatchSnapshot() - }) -}) diff --git a/test/components/JoinUs.test.js b/test/components/JoinUs.test.js deleted file mode 100644 index c831459..0000000 --- a/test/components/JoinUs.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { shallowMount } from '@vue/test-utils' -import JoinUs from '../../components/JoinUs' - -describe('JoinUs', () => { - // Now mount the component and you have the wrapper - const wrapper = shallowMount(JoinUs) - - it('match snapshot', () => { - expect(wrapper.element).toMatchSnapshot() - }) -}) diff --git a/test/components/NavBar.test.js b/test/components/NavBar.test.js deleted file mode 100644 index be61915..0000000 --- a/test/components/NavBar.test.js +++ /dev/null @@ -1,27 +0,0 @@ -import { shallowMount } from '@vue/test-utils' -import NavBar from '../../components/NavBar' - -describe('NavBar', () => { - // Now mount the component and you have the wrapper - const wrapper = shallowMount(NavBar) - - wrapper.setProps({ - title: 'Title', - routes: [ - { - path: '/', - name: 'Home' - } - ] - }) - - it('check title', () => { - expect(wrapper.html()).toContain( - 'Title' - ) - }) - - it('match snapshot', () => { - expect(wrapper.element).toMatchSnapshot() - }) -}) diff --git a/test/components/NavLink.test.js b/test/components/NavLink.test.js deleted file mode 100644 index d35e6db..0000000 --- a/test/components/NavLink.test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { shallowMount } from '@vue/test-utils' -import NavLink from '../../components/NavLink' - -describe('NavLink', () => { - // Now mount the component and you have the wrapper - const wrapper = shallowMount(NavLink) - - wrapper.setProps({ link: '/link', name: 'Link' }) - - it('renders the correct markup', () => { - expect(wrapper.html()).toContain( - `` - ) - }) - - it('check text', () => { - expect(wrapper.text()).toBe('Link') - }) - - it('match snapshot', () => { - expect(wrapper.element).toMatchSnapshot() - }) -}) diff --git a/test/components/__snapshots__/FacebookFeed.test.js.snap b/test/components/__snapshots__/FacebookFeed.test.js.snap deleted file mode 100644 index 6819e12..0000000 --- a/test/components/__snapshots__/FacebookFeed.test.js.snap +++ /dev/null @@ -1,13 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`FacebookFeed match snapshot 1`] = ` -
-

- Zobacz co się dzieje! -

- - -
-`; diff --git a/test/components/__snapshots__/FacebookFindUsButton.test.js.snap b/test/components/__snapshots__/FacebookFindUsButton.test.js.snap deleted file mode 100644 index 98783c4..0000000 --- a/test/components/__snapshots__/FacebookFindUsButton.test.js.snap +++ /dev/null @@ -1,19 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`FacebookFindUsButton match snapshot 1`] = ` - -
- Find us on Facebook -
-
-`; diff --git a/test/components/__snapshots__/Footer.test.js.snap b/test/components/__snapshots__/Footer.test.js.snap deleted file mode 100644 index 577f85e..0000000 --- a/test/components/__snapshots__/Footer.test.js.snap +++ /dev/null @@ -1,66 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Footer match snapshot 1`] = ` -