This is the repo for the PosterVote front end source code.
It is a PWA
served inside a single
index.html file which is compiled through the
vue cli using Webpack.
Table of Contents
- Future Work
# Install dependencies (run once after a clone) npm install # Run a development server npm run serve open http://localhost:8080 # Manually lint dependancies npm run lint
|public||Static assets to be served by nginx|
|src||The location of the source code|
|src/assets||Assets to be compiled in with webpack|
|src/components||Custom Vue components|
|src/services||Custom js services to access things, i.e. the postervote api|
|src/views||Custom Vue components to be routed to|
|tools||Scripts to ease development|
This repo uses Prettier to automatically format code when you stage changes.
This means that code that is pushed is always formatted to a consistent standard.
You can manually run the formatter with
npm run prettier.
# Generates sized favicons based on `public/large-icon.png` node tools/genFavicon.js # Generate the table of contents for this readme node tools/markdownTOC.js
Building the image
This project uses a GitLab CI
to build a Docker image when you push a git tag.
This is designed to be used with the
npm version command so all docker images
are semantically versioned.
npm version ... # major | minor | patch git push --tags
Using the image
version: '3' services: web: image: openlab.ncl.ac.uk:4567/poster-vote/vue-frontend:1.0.0 restart: unless-stopped ports: - 80:80 environment: - CONFIG_KEYS=API_URL - API_URL=https://api.postervote.example.io
- Only show your posters on
/posters(if you visted another and its cached)
The code on https://github.com/poster-vote/vue-frontend is a mirror of https://openlab.ncl.ac.uk/gitlab/poster-vote/vue-frontend