||The Webpack configuration and build scripts, generated using the vue-cli|
||Configurations for different versions of the build i.e production vs dev|
||Config for the nginx server the app is deployed in|
||The actual source code for the webapp|
||Files for interacting with/mocking the Gabber API|
||Vue single file components (.vue), grouped by context|
||Cross project constant values|
||Vue event busses|
||Vue components which solely layout content using
||The vue-router and its routes|
||The vue-store and its modules|
||Vue components that are directly routed to by the router|
||Static assets that are served along side the compiled source|
||Scripts for development, namely the docker postversion one|
The entrypoint to the app is
/src/main.js, if you follow the dependancies from there you should work out structure of the app.
# install dependencies npm install # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report
The app uses an ApiInterface to interact with a live/mock api so they can easily be switch out for testing.
It uses the
API_URL config variables to decide if it is using the mock version or not.
This repo uses a CI to build the web into a docker image, ready to be deployed.
Whenever a commit is pushed with an git tag it builds an image for that commit.
To tag the commit, use the
npm version ... command which updates the package
version and commits the
package.json tagged with the new version.
# Update the npm version # > Make sure to run without unstaged changes npm version # patch | minor | major | prepatch | preminor | prerelease
# If using a dist-tag i.e. beta, use `npm prerelease` to increment subversions npm version 1.0.0-beta.1 # 1.0.0-beta.1 npm version prerelease # 1.0.0-beta.2 # To experiment with npm version mkdir test_dir cd test_dir npm init -y npm version # ...
To configure the deployment, use the
CONFIG_KEYS environment variable.
Which should be a csv of environment variables you want inserted,
the variables are inserted at
You should use the Config Mixin to access variables
which falls back to using
process.env (where webpack config is placed).
environment: CONFIG_KEYS: MOCK_API,API_URL API_URL: https://api.gabber.audio MOCK_API: true