From 0931d2a9298c187ad8cb0467f523581d1d851d8b Mon Sep 17 00:00:00 2001 From: Rodney Lab Date: Thu, 28 Oct 2021 16:20:08 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=E2=9A=99=EF=B8=8F=20tweak=20for=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/src/lib/config/website.js | 31 ++++++++++++ generate-manifest.js | 2 +- package.json | 1 + pnpm-lock.yaml | 86 ++++++++++++++++++++++++++++++++++ 4 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 dist/src/lib/config/website.js diff --git a/dist/src/lib/config/website.js b/dist/src/lib/config/website.js new file mode 100644 index 0000000..3b936d1 --- /dev/null +++ b/dist/src/lib/config/website.js @@ -0,0 +1,31 @@ +const facebookPageName = import.meta.env ? import.meta.env.VITE_FACEBOOK_PAGE : ''; +const facebookAuthorPageName = import.meta.env ? import.meta.env.VITE_FACEBOOK_AUTHOR_PAGE : ''; + +const website = { + author: 'Rodney Johnson', + entity: 'Rodney Lab', + ogLanguage: 'en_GB', + siteLanguage: 'en-GB', + siteTitle: 'SvelteKit Blog Mdx', + siteShortTitle: 'SvelteKit Blog', + siteUrl: import.meta.env ? import.meta.env.VITE_SITE_URL : '', + icon: 'static/icon.png', + backgroundColor: '#1b4079', + themeColor: '#d62828', + contactEmail: import.meta.env ? import.meta.env.VITE_CONTACT_EMAIL : '', + facebookAuthorPage: `https://www.facebook.com/${facebookAuthorPageName}`, + facebookAuthorPageName, + facebookPage: `https://www.facebook.com/${facebookPageName}`, + facebookPageName, + githubPage: import.meta.env ? import.meta.env.VITE_GITHUB_PAGE : '', + linkedinProfile: import.meta.env ? import.meta.env.VITE_LINKEDIN_PROFILE : '', + telegramUsername: import.meta.env ? import.meta.env.VITE_TELEGRAM_USERNAME : '', + tiktokUsername: import.meta.env ? import.meta.env.VITE_TIKTOK_USERNAME : '', + twitterUsername: import.meta.env ? import.meta.env.VITE_TWITTER_USERNAME : '', + twitterUserId: import.meta.env ? import.meta.env.VITE_TWITTER_ID : '', + wireUsername: import.meta.env ? import.meta.env.VITE_WIRE_USERNAME : '', + hcaptchaSitekey: import.meta.env ? import.meta.env.VITE_HCAPTCHA_SITEKEY : '', + workerUrl: import.meta.env ? import.meta.env.VITE_WORKER_URL : '', +}; + +export { website as default }; diff --git a/generate-manifest.js b/generate-manifest.js index 32fe7b8..69cf305 100644 --- a/generate-manifest.js +++ b/generate-manifest.js @@ -1,7 +1,7 @@ import fs from 'fs'; import path from 'path'; import sharp from 'sharp'; -import website from './src/lib/config/website.js'; +import website from './dist/src/lib/config/website.js'; const __dirname = path.resolve(); const iconsDirectory = path.join(__dirname, 'static/icons'); diff --git a/package.json b/package.json index b97c4ad..7abc7b6 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "svelte-feather-icons": "^3.5.0", "svelte-preprocess": "^4.9.8", "svelte-preprocess-import-assets": "^0.1.3", + "ts-node": "^10.4.0", "tslib": "^2.3.1", "typescript": "^4.4.4", "vanilla-lazyload": "^17.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c582133..064d4b3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,6 +42,7 @@ specifiers: svelte-feather-icons: ^3.5.0 svelte-preprocess: ^4.9.8 svelte-preprocess-import-assets: ^0.1.3 + ts-node: ^10.4.0 tslib: ^2.3.1 typescript: ^4.4.4 vanilla-lazyload: ^17.5.0 @@ -89,6 +90,7 @@ devDependencies: svelte-feather-icons: 3.5.0 svelte-preprocess: 4.9.8_svelte@3.44.0+typescript@4.4.4 svelte-preprocess-import-assets: 0.1.3_svelte@3.44.0 + ts-node: 10.4.0_typescript@4.4.4 tslib: 2.3.1 typescript: 4.4.4 vanilla-lazyload: 17.5.0 @@ -117,6 +119,18 @@ packages: js-tokens: 4.0.0 dev: true + /@cspotcode/source-map-consumer/0.8.0: + resolution: {integrity: sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==} + engines: {node: '>= 12'} + dev: true + + /@cspotcode/source-map-support/0.7.0: + resolution: {integrity: sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==} + engines: {node: '>=12'} + dependencies: + '@cspotcode/source-map-consumer': 0.8.0 + dev: true + /@emotion/hash/0.8.0: resolution: {integrity: sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==} dev: true @@ -283,6 +297,22 @@ packages: - supports-color dev: true + /@tsconfig/node10/1.0.8: + resolution: {integrity: sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==} + dev: true + + /@tsconfig/node12/1.0.9: + resolution: {integrity: sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==} + dev: true + + /@tsconfig/node14/1.0.1: + resolution: {integrity: sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==} + dev: true + + /@tsconfig/node16/1.0.2: + resolution: {integrity: sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==} + dev: true + /@types/json-schema/7.0.9: resolution: {integrity: sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==} dev: true @@ -475,6 +505,11 @@ packages: acorn: 8.5.0 dev: true + /acorn-walk/8.2.0: + resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} + engines: {node: '>=0.4.0'} + dev: true + /acorn/8.5.0: resolution: {integrity: sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==} engines: {node: '>=0.4.0'} @@ -547,6 +582,10 @@ packages: readable-stream: 2.3.7 dev: true + /arg/4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + dev: true + /argparse/1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} dependencies: @@ -759,6 +798,10 @@ packages: yaml: 1.10.2 dev: true + /create-require/1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + dev: true + /cross-spawn/7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -852,6 +895,11 @@ packages: hasBin: true dev: true + /diff/4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + dev: true + /dir-glob/3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -1730,6 +1778,10 @@ packages: sourcemap-codec: 1.4.8 dev: true + /make-error/1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + dev: true + /map-obj/1.0.1: resolution: {integrity: sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=} engines: {node: '>=0.10.0'} @@ -2802,6 +2854,35 @@ packages: engines: {node: '>=8'} dev: true + /ts-node/10.4.0_typescript@4.4.4: + resolution: {integrity: sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.7.0 + '@tsconfig/node10': 1.0.8 + '@tsconfig/node12': 1.0.9 + '@tsconfig/node14': 1.0.1 + '@tsconfig/node16': 1.0.2 + acorn: 8.5.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 4.4.4 + yn: 3.1.1 + dev: true + /tslib/1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true @@ -2989,6 +3070,11 @@ packages: engines: {node: '>=10'} dev: true + /yn/3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + dev: true + /yocto-queue/0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'}