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

Replace vue-legacy test by vue vite for stability #537

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 1 addition & 23 deletions integration-tests/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
%root-path.quarkus.quinoa.ui-dir=src/main/ui-lit
%root-path.quarkus.http.root-path=/foo/bar
%root-path.quarkus.quinoa.enable-spa-routing=true
%root-path.quarkus.quinoa.build-dir=dist
%root-path.quarkus.quinoa.index-page=app.html
%root-path.quarkus.quinoa.package-manager-command.build=run build-per-env
%root-path.quarkus.quinoa.package-manager-command.build-env.FOO=bar
%root-path.quarkus.quinoa.package-manager-command.build-env.ROOT_PATH=${quarkus.http.root-path}/

%react.quarkus.quinoa.ui-dir=src/main/ui-react
%vue.quarkus.quinoa.ui-dir=src/main/ui-vue
%vue.quarkus.quinoa.build-dir=dist
%angular.quarkus.quinoa.ui-dir=src/main/ui-angular
%angular.quarkus.quinoa.build-dir=dist/quinoa-app
%angular.quarkus.quinoa.enable-spa-routing=true
%angular.quarkus.resteasy-reactive.path=/bar/foo
%angular.quarkus.quinoa.ignored-path-prefixes=/q,/bar/foo/baz
Expand All @@ -26,19 +18,5 @@
%lit.quarkus.quinoa.package-manager-command.build-env.FOO=bar
%lit.quarkus.quinoa.package-manager-command.build-env.ROOT_PATH=/
%yarn.quarkus.quinoa.package-manager=yarn
%yarn.quarkus.quinoa.ui-dir=src/main/ui-react
%react-just-build.quarkus.quinoa.ui-dir=src/main/ui-react
%react-just-build.quarkus.quinoa.just-build=true
%just-build.quarkus.quinoa.just-build=true


%angular-dev.quarkus.quinoa.dev-server.port=4200
%angular-dev.quarkus.quinoa.ui-dir=src/main/ui-angular
%angular-dev.quarkus.quinoa.build-dir=dist/quinoa-app
%angular-dev.quarkus.quinoa.enable-spa-routing=true
%angular-dev.quarkus.resteasy-reactive.path=/bar/foo
%angular-dev.quarkus.quinoa.ignored-path-prefixes=/q
%react-dev.quarkus.quinoa.ui-dir=src/main/ui-react
%react-dev.quarkus.quinoa.dev-server.port=3000
%vue-dev.quarkus.quinoa.dev-server.port=3000
%vue-dev.quarkus.quinoa.ui-dir=src/main/ui-vue
%vue-dev.quarkus.quinoa.build-dir=dist/
14 changes: 14 additions & 0 deletions integration-tests/src/main/ui-vue/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
}
}
27 changes: 16 additions & 11 deletions integration-tests/src/main/ui-vue/.gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
.DS_Store
node_modules
/dist


# local env files
.env.local
.env.*.local

# Log files
# 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
.vscode
*.suo
*.ntvs*
*.njsproj
Expand Down
8 changes: 8 additions & 0 deletions integration-tests/src/main/ui-vue/.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"
}
47 changes: 32 additions & 15 deletions integration-tests/src/main/ui-vue/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@
# hello-quinoa
# vue-project

## Project setup
```
yarn install
```
This template should help get you started developing with Vue 3 in Vite.

### Compiles and hot-reloads for development
```
yarn serve
```
## 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).

## Customize configuration

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

## Project Setup

### Compiles and minifies for production
```sh
npm install
```
yarn build

### Compile and Hot-Reload for Development

```sh
npm run dev
```

### Lints and fixes files
### Compile and Minify for Production

```sh
npm run build
```
yarn lint

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

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

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
### Lint with [ESLint](https://eslint.org/)

```sh
npm run lint
```
5 changes: 0 additions & 5 deletions integration-tests/src/main/ui-vue/babel.config.js

This file was deleted.

13 changes: 13 additions & 0 deletions integration-tests/src/main/ui-vue/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>hello-quinoa</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
19 changes: 0 additions & 19 deletions integration-tests/src/main/ui-vue/jsconfig.json

This file was deleted.

56 changes: 21 additions & 35 deletions integration-tests/src/main/ui-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,29 @@
{
"name": "hello-quinoa",
"version": "0.1.0",
"name": "vue-project",
"version": "0.0.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --port 3000",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"test:unit": "vitest",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
"format": "prettier --write src/"
},
"dependencies": {
"core-js": "^3.31.0",
"vue": "^3.3.4"
"vue": "^3.3.4",
"vue-router": "^4.2.4"
},
"devDependencies": {
"@babel/core": "^7.22.9",
"@babel/eslint-parser": "^7.22.9",
"@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-service": "~5.0.8",
"eslint": "^8.46.0",
"eslint-plugin-vue": "^9.16.1"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"not ie 11"
]
"@rushstack/eslint-patch": "^1.3.3",
"@vitejs/plugin-vue": "^4.3.4",
"@vue/eslint-config-prettier": "^8.0.0",
"@vue/test-utils": "^2.4.1",
"eslint": "^8.49.0",
"eslint-plugin-vue": "^9.17.0",
"jsdom": "^22.1.0",
"prettier": "^3.0.3",
"vite": "^4.4.9",
"vitest": "^0.34.4"
}
}
17 changes: 0 additions & 17 deletions integration-tests/src/main/ui-vue/public/index.html

This file was deleted.

93 changes: 76 additions & 17 deletions integration-tests/src/main/ui-vue/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,26 +1,85 @@
<script setup>
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
</script>

<template>
<img alt="Vue logo" src="./assets/logo.png">
<HelloWorld msg="Welcome to Your Vue Quinoa App"/>
<header>
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />

<div class="wrapper">
<HelloWorld msg="You did it!" />

<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/about">About</RouterLink>
</nav>
</div>
</header>

<RouterView />
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'
<style scoped>
header {
line-height: 1.5;
max-height: 100vh;
}

export default {
name: 'App',
components: {
HelloWorld
}
.logo {
display: block;
margin: 0 auto 2rem;
}
</script>

<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
nav {
width: 100%;
font-size: 12px;
text-align: center;
color: #2c3e50;
margin-top: 60px;
margin-top: 2rem;
}

nav a.router-link-exact-active {
color: var(--color-text);
}

nav a.router-link-exact-active:hover {
background-color: transparent;
}

nav a {
display: inline-block;
padding: 0 1rem;
border-left: 1px solid var(--color-border);
}

nav a:first-of-type {
border: 0;
}

@media (min-width: 1024px) {
header {
display: flex;
place-items: center;
padding-right: calc(var(--section-gap) / 2);
}

.logo {
margin: 0 2rem 0 0;
}

header .wrapper {
display: flex;
place-items: flex-start;
flex-wrap: wrap;
}

nav {
text-align: left;
margin-left: -1rem;
font-size: 1rem;

padding: 1rem 0;
margin-top: 1rem;
}
}
</style>
Loading