-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace vue-legacy test by vue vite for stability (#537)
- Loading branch information
Showing
34 changed files
with
1,766 additions
and
5,479 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.