Skip to content

PeerJ/uvr-issues

Repository files navigation

vue3-starter-template

This template should help get you started developing with Vue 3 in Vite with TypeScript.

Yarn info

the local deployment of yarn is maintained in .yarnrc.yml

"Plug n Play" mode is disabled using nodeLinker: node-modules owing to enduring issues with intellisense and typescript. You can attempt to re-enable it by switching back to nodeLinker: pnp; at the time of writing, it wasn't possible to jump to code origins referenced in node_modules from your code and documentation was limited. This should be reviewed in future.

because of this, yarnPath is commented out in the .yarnrc.yml and should not be used as it will cause build issues.

Recommended IDE Setup

  1. VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

  2. ESLint, ensure you have dbaeumer.vscode-eslint installed (it can take a few minutes to start working in-editor once installed)

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Vite

vite doesn't handle type checking as part of its dev activity, for this reason vue-tsc has been included and the tsconfig has been simplified into a singular json file.

  • the vue-tsc does not support "composite" tsconfigs at this stage (ie. configs that are broken into sub-configs)

  • vite.config enables plugin support through checker({ vueTsc: true }). If you want to disable dev auto-using vue-tsc, remove this line (and the associated import)

PrimeVue, PrimeFlex and theming SCSS

PrimeFlex is a related CSS library that adds various utilities etc.

Prime Vue is theme agnostic. Unlike Bootstrap, Vuetify, etc. you import a "theme" css which determines colours, animations, etc.

this is chosen in main.ts,

FontAwesomeIcon recommendation

Import from the icon file you wish to use directly into the given component:

import { faPaperPlane } from '@fortawesome/free-solid-svg-icons/faPaperPlane'

because yarn is not set to PnP, this will help to manage bundle size.

assign the destructured variable directly to <FontAwesomeIcon />:

<FontAwesomeIcon :icon="faPaperPlane" />

Customize configuration

See Vite Configuration Reference.

Project Setup

yarn install

Compile and Hot-Reload for Development

yarn dev

Type-Check, Compile and Minify for Production

yarn build

Run Unit Tests with Vitest

yarn test

Lint with ESLint

yarn lint

About

a project demoing issues with UVR (for public discussion)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published