Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue3 migration using create vue #17

Open
wants to merge 34 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4b3e0f2
Replace node-sass with sass
johanbissemattsson Jun 28, 2023
9bf0d1a
Create new vue-project using create-vue
johanbissemattsson Jun 28, 2023
fff63b6
Add settings store
didair Jun 28, 2023
507b575
Wrong store name
didair Jun 28, 2023
020a23c
Remove default assets
didair Jun 28, 2023
296e88e
Copy assets
didair Jun 28, 2023
774829e
Add some missing dependencies
didair Jun 28, 2023
e8202f3
Move more files from vue-client
didair Jun 28, 2023
d739a5e
Add icons
didair Jun 28, 2023
3014619
Rewrite router listener used to set document title
didair Jun 28, 2023
8c515e6
WIP matomo and add whatwg-fetch
didair Jun 28, 2023
cde3864
Clear out components and views directories
didair Jun 28, 2023
2f7efdf
WIP vue3 upgrade
didair Jun 30, 2023
71e35a6
Runtime directive used on component with non-element root node
didair Jul 5, 2023
7641503
WIP run network calls and improvments
didair Jul 10, 2023
301149d
Fix ExportData imports (stop using async components for now)
didair Jul 11, 2023
27f458c
Update SelectBase
didair Jul 12, 2023
4996223
Fix SelectBase events
didair Jul 12, 2023
cc4e1fc
Fix YearPicker
didair Jul 12, 2023
65d46d7
WIP Fix new spinner
didair Jul 12, 2023
d634d52
More updates
didair Jul 12, 2023
4179580
Fix tooltip and helpbubble
didair Jul 14, 2023
5826343
Kinda fix Chart.JS and charts
didair Jul 31, 2023
e19d502
Fix chartjs tooltips
didair Jul 31, 2023
9b4b63c
Fix version in settings store
didair Jul 31, 2023
0fab2e0
Merge branch 'develop' into vue3_migration_using_create_vue
didair Jul 31, 2023
305eb43
Move v-for
didair Aug 21, 2023
22f1b68
Update package.json
johanbissemattsson Aug 21, 2023
dc7e882
Set supported node version to 18 and above
johanbissemattsson Aug 21, 2023
29fe25a
Update package lock file
johanbissemattsson Aug 23, 2023
d97b272
Add old test specs
johanbissemattsson Aug 23, 2023
a41bfb6
Migrate validations component to pinia
johanbissemattsson Aug 23, 2023
5db8409
Migrate mainnav cypress test
johanbissemattsson Aug 23, 2023
b4b777c
Fix destructured prop reactivity
johanbissemattsson Nov 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
606 changes: 527 additions & 79 deletions service/vue-client/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion service/vue-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"eslint-plugin-vue": "^8.7.1",
"flush-promises": "^1.0.2",
"jest-fetch-mock": "^3.0.3",
"node-sass": "^6.0.1",
"sass": "^1.63.6",
"sass-loader": "11.1.1",
"vue-template-compiler": "^2.6.12",
"webpack": "^5.0.0"
Expand Down
18,386 changes: 8,903 additions & 9,483 deletions service/vue-client/yarn.lock

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions service/vue3-client/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
overrides: [
{
files: [
'cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}'
],
'extends': [
'plugin:cypress/recommended'
]
}
],
parserOptions: {
ecmaVersion: 'latest'
}
}
28 changes: 28 additions & 0 deletions service/vue3-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
8 changes: 8 additions & 0 deletions service/vue3-client/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
3 changes: 3 additions & 0 deletions service/vue3-client/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}
68 changes: 68 additions & 0 deletions service/vue3-client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# vue3-client

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

## Recommended IDE Setup

[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).

## 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)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) 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](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) 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.

## Customize configuration

See [Vite Configuration Reference](https://vitejs.dev/config/).

## Project Setup

```sh
npm install
```

### Compile and Hot-Reload for Development

```sh
npm run dev
```

### Type-Check, Compile and Minify for Production

```sh
npm run build
```

### Run Unit Tests with [Vitest](https://vitest.dev/)

```sh
npm run test:unit
```

### Run End-to-End Tests with [Cypress](https://www.cypress.io/)

```sh
npm run test:e2e:dev
```

This runs the end-to-end tests against the Vite development server.
It is much faster than the production build.

But it's still recommended to test the production build with `test:e2e` before deploying (e.g. in CI environments):

```sh
npm run build
npm run test:e2e
```

### Lint with [ESLint](https://eslint.org/)

```sh
npm run lint
```
8 changes: 8 additions & 0 deletions service/vue3-client/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from 'cypress'

export default defineConfig({
e2e: {
specPattern: 'cypress/specs/*.{js,jsx,ts,tsx}',
baseUrl: 'http://localhost:4173'
}
})
Loading