This repo is for the new wep app front-end for SDSS-V
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
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:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensions
from VSCode's command palette - Find
TypeScript and JavaScript Language Features
, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Window
from the command palette.
This project is scaffolded with the following libraries:
- Vue - modern javascript framework
- Vuetify - material-design UI component library
- Vue-Router - build multi-page applications
- Pinia - share application state between components
- Vitest - component unit testing
- Playwright - UI end-to-end browser testing
- Vue Test Utils - Vue Testing Utilities
Git clone this repo and run the following
# npm
npm install
# install a new package and add it to the "dependencies" section of package.json
npm install [package]
# install a new package and add it to the "devDependencies" section of package.json
npm install -D [package]
# npm
npm run dev
# npm
npm run build
Run Unit Tests with Vitest
npm run test:unit
Run End-to-End Tests with Playwright
# Install browsers for the first run
npx playwright install
# When testing on CI, must build the project first
npm run build
# Runs the end-to-end tests
npm run test:e2e
# Runs the tests only on Chromium
npm run test:e2e -- --project=chromium
# Runs the tests of a specific file
npm run test:e2e -- tests/example.spec.ts
# Runs the tests in debug mode
npm run test:e2e -- --debug
Lints and fixes files with ESLint
# npm
npm run lint
Format the Code with Prettier
# npm
npm run format
See Vite Configuration Reference.
This repo was created using modified instructions from the Vuetify installation, using nodejs 9.5.1.
- run
npm create vuetify
- Select the following options
- Essentials (Vue, VueRouter, Pinia)
- Select "yes" to Typescript
- Select "npm" for how to install dependencies
- In
package.json
, update the following dependencies- In
dependencies
, update- vue:
^3.2.47
- vue-router:
^4.1.6
- vue:
- In 'devDependencies', update
- @vitejs/plugin-vue:
^4.0.0
- vite:
^4.2.0
- vite-plugin-vuetify:
^1.0.0
- @vitejs/plugin-vue:
- In
- Run
npm install
to install initial package - Install
Vitest
,Playwright
, andVue Test Utils