The sauce behind shouldieatthere.co.uk. Eat Cleaner.
docker-compose up --buildThe app can be found at localhost:9091.
yarn
yarn serveThe 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 lintJavaScript/Vue linting is provided by ESLint and follows eslint-config-airbnb and vue/strongly-recommended, with the following adjustments:
max-lenwhich is set to 150 to accommodate the verbosity of HTML in Vue templates.vue/html-closing-bracket-newlinewhich is set toneverfor 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-beforewhich is set toalways, because space is not only the final frontier, but also paramount to readable (S)CSS.order/properties-alphabetical-orderset 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 testYou'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:productionThe 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.