Read through Frontend's wiki pages to get started.
Read through Vuex Guideline to understand how our state management is organized.
Needed to install vue-cli plugins
and using vue ui
$ npm install -g @vue/cli
npm update --save/--save-dev -f
There are 3 .env
files required for testing
, development
, and production
:
Config files available in our slack channel
$ npm install
stylelint
for on the fly SCSS lintingInstall IntelliJ Stylelint Plugin
:
Marketplace
tabstylelint
and press enterIntelliJ Stylelint Plugin
Enable stylelint:
enable
boxProcess JS files
boxEnsure .stylelintrc.json
is defined.
=eslint
for on the fly eslintingAutomatic ESLint Configuration
<script>
and <style>
tag:Other
tabsDo not indent children of
: add style
and script
cmd + option + L
npm run serve
** To make RPC's to work within the app in dev mode, you need to also run services in Docker Container (below)
Make sure you have Docker Desktop installed.
Installing Docker Desktop comes with docker-compose
.
The following commands will start local docker containers for:
Starting at root of hwsc-frontend
, run the following:
$ cd docker
$ docker-compose up
You can usually stop your containers successfully with ctrl + c
.
Sometimes that command will prematurely abort and won't stop all containers.
In that case follow up with $ docker-compose stop
.
Or just use $ docker-compose stop
.
npm run build
npm run build:dev
docker-compose
for unit testing in a CI/CD pipeline
npm run build:test
npm run test
To extend lint rules refer to this vue guide and eslint guide
npm run lint
npm run lint:css
npm run test:e2e
After you run this command, jest will create a coverage
directory in root of hwsc-frontend
.
You can view code coverage results in the browser by clicking on index.html and opening in browser.
npm run test:unit
After you run this command, jest will create a coverage
directory in root of hwsc-frontend
.
You can view code coverage results in the browser by clicking on index.html and opening in browser.
npm run test:unit
After globally installing @vue/cli
package, you can launch Vue UI
which
will open up a browser control panel to:
$ vue ui
sourceMap
is enabled in tsconfig.json
, so you can debug using browser dev tools