From 292300523d00eec08c305a5e26147cac490a76ef Mon Sep 17 00:00:00 2001 From: Steffen Date: Sat, 9 Jan 2021 21:33:09 +0100 Subject: [PATCH] linting and details on hosting your own fork --- CONTRIBUTING.md | 22 ++++++++++++++++++++++ src/components/modals/VoteHistoryModal.vue | 12 ++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 00c34d2..cea9e5e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,6 +43,20 @@ $ npm install The development server can be started with `npm run serve`. +### Deploying to GitHub pages or with a non-root path + +Deploying a forked version to GitHub Pages or running your local +development copy in a sub-path (instead of the web root) will require you to modify +the `vue.config.js` and configure the path at which the website will be served. + +For example, deploying your forked `townsquare` project to GitHub pages would need the following +`vue.config.js` changes: +```js +module.exports = { + publicPath: process.env.NODE_ENV === "production" ? "/townsquare/" : "/" +}; +``` + ### Committing Changes Commit messages should be verbose enough to allow someone else to follow your changes and should include references to issues that are being worked on. @@ -64,6 +78,10 @@ $ npm run lint - **`dist`**: contains built files for distribution. +- **`public`**: static assets and templates that don't need to be built dynamically. + +- **`server`**: NodeJS code for the live session backend server. + - **`src`**: contains the source code. The codebase is written in ES2015. - **`assets`**: contains all graphical assets like images, fonts, icons, etc. @@ -73,9 +91,13 @@ $ npm run lint - **`fonts`**: webfonts used on the page - **`icons`**: character token icons + + - **`sounds`**: sound effects used on the page - **`components`**: the internal components used in the project - **`modals`**: the modals have a separate subfolder - **`store`**: the VueX data store and modules + + - **`modules`**: VueX modules that live in their own namespace diff --git a/src/components/modals/VoteHistoryModal.vue b/src/components/modals/VoteHistoryModal.vue index 8295ea6..93afa6a 100644 --- a/src/components/modals/VoteHistoryModal.vue +++ b/src/components/modals/VoteHistoryModal.vue @@ -30,8 +30,16 @@ - {{ vote.timestamp.getHours().toString().padStart(2, "0") }}:{{ - vote.timestamp.getMinutes().toString().padStart(2, "0") + {{ + vote.timestamp + .getHours() + .toString() + .padStart(2, "0") + }}:{{ + vote.timestamp + .getMinutes() + .toString() + .padStart(2, "0") }} {{ vote.nominator }}