This is a possible base setup of Vue.js for the Emergency Room team. I (fabian.gander@garaio.com) try to define a default, so we can start much easier and faster with new projects. Every comment / contribution is very welcome.
The base setup of a vue project developed at Emergency Room Team.
Its a base setup of vue-cli project using the following choices:
- node-sass
- babel
- typescript
- vuex
- eslint
- unit-jest
We have extended the setup a little bit to have a better developer experience
We use prettier to automatically format the files, a configuration file is available to share across devs.
Manually extended to use vuex-class(vuex modules namespace helper)
Some vue / vetur / eslint / etc configurations are also part of the commit, so every developer has the same experience / formatting etc. This is for project related configrations, make sure you don't add your personal preferences into this file. (vs code has both project / user settings)
We also have some file structure suggestions, which is in trial phase. The goal is to put most of modular things into modules, we also try right now with vuex-store in there.
For example code we have a demo component / module in here, this can be simply removed once its clear how to code.
We have worked out a vuex-typescript standard how to code and use the store with typescript and the class - way.
npm install
npm run serve
npm run build
npm run lint
This script has to collect all type of tests (unit,snapshot,ect) and run it. In case if you add a new type of test, you should add to this script. Before we would run these tests we run the linter.
npm run tests
npm run test:unit
In case if you want to debug your unit tests in Chrome inspector, you just need to run this script. More about how to debug unit tests in Chrome inspector: https://stackoverflow.com/c/garaio/questions/198
npm run test:unit:debug