This is a VueJS version of the Government of Canada's Web Experience Toolkit (WET-BOEW)
WARNING: This is far from a complete port of WET-BOEW and is still in the experimental stage. Use at your own risk.
You'll need the following:
npm i yarn -gnpm i httpster -gIf you're using VSCode as your editor (recommended), just install the Prettier VSCode Extension
Otherwise you can install globally with:
npm i --save-exact prettier -g
The first time you run a dev build, run:
yarn && yarn devSubsequently you can just run:
yarn devTIP: Keep it running while you work to see your changes instantly.
yarn build && cd dist && httpsterVSCode + Prettier + Vetur. Make sure to enable vetur.experimental.templateInterpolationService in settings!
<script setup> is a feature that is currently in RFC stage. To get proper IDE support for the syntax, use Volar instead of Vetur (and disable Vetur).
Since TypeScript cannot handle type information for .vue imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in .vue imports (for example to get props validation when using manual h(...) calls), you can use the following:
Run Volar: Switch TS Plugin on/off from VSCode command palette.
- Install and add
@vuedx/typescript-plugin-vueto the plugins section intsconfig.json - Delete
src/shims-vue.d.tsas it is no longer needed to provide module info to Typescript - Open
src/main.tsin VSCode - Open the VSCode command palette
- Search and run "Select TypeScript version" -> "Use workspace version"