The sauce behind shouldieatthere.co.uk. Eat Cleaner.
docker-compose up --build
The app can be found at localhost:9091.
yarn
yarn serve
The app can be found at localhost:8080.
This project uses a number of tools and configurations to enforce an opinionated and rigorous code style. These are run as you save by the dev server and can also be run using:
# Docker
docker-compose --rm web yarn lint
## No Docker
yarn lint
JavaScript/Vue linting is provided by ESLint and follows eslint-config-airbnb and vue/strongly-recommended, with the following adjustments:
max-len
which is set to 150 to accommodate the verbosity of HTML in Vue templates.vue/html-closing-bracket-newline
which is set tonever
for both single and multiline HTML. Why? Because closing braces floating on their own line are ugly.
Config file: .eslintrc.js
CSS/SCSS linting is provided by Stylelint and follows stylelint-config-recommended, stylelint-scss and stylelint-order, with the following adjustments:
rule-empty-line-before
which is set toalways
, because space is not only the final frontier, but also paramount to readable (S)CSS.order/properties-alphabetical-order
set totrue
, which makes it much faster and easier to find properties in a block.
Config file: stylelint.config.js
Tests can be run with the following:
# Docker
docker-compose --rm web yarn test
## No Docker
yarn test
You'll need to add the CA Certificate in config/ssl
for HTTPS to work correctly on your machine. Once you've done this, simply run:
# Docker
docker-compose run --rm web -p 9091:8080 yarn run serve:production
# No Docker
yarn run serve:production
The site will load on https://localhost:9091. And the build will be available in the dist/
folder.
Environment variables follow the vue.js standard, using .env
files for each mode. Variables exposed to the client side must be prefixed with VUE_APP
and must not contain any sensitive information.
For a list of required environment variables, see .env.example
.
Configuration of the build process and any extensions of the bundled webpack configuration are found in here. Hopefully you won't need to open touch this unless you need to add a new Webpack plugin or loader. The full documentation can be found at cli.vuejs.org/config.
The project follows the standard vue.js template as generated by the Vue CLI.
Deployments are currently hosted and managed by Vercel (formerly Zeit).
Built from master
.
Built from develop
.