Skip to content

Commit c5e94c8

Browse files
committed
version 2.1.0 snapshot
1 parent ed7915d commit c5e94c8

File tree

1,880 files changed

+46104
-820
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,880 files changed

+46104
-820
lines changed

cypress/.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
dist
13+
dist-ssr
14+
*.local
15+
16+
/cypress/videos/
17+
/cypress/screenshots/
18+
19+
# Editor directories and files
20+
.vscode
21+
!.vscode/extensions.json
22+
.idea
23+
*.suo
24+
*.ntvs*
25+
*.njsproj
26+
*.sln
27+
*.sw?

cypress/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# cypress
2+
3+
This template should help get you started developing with Vue 3 in Vite.
4+
5+
## Recommended IDE Setup
6+
7+
[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).
8+
9+
## Customize configuration
10+
11+
See [Vite Configuration Reference](https://vitejs.dev/config/).
12+
13+
## Project Setup
14+
15+
```sh
16+
pnpm install
17+
```
18+
19+
### Compile and Hot-Reload for Development
20+
21+
```sh
22+
pnpm dev
23+
```
24+
25+
### Compile and Minify for Production
26+
27+
```sh
28+
pnpm build
29+
```
30+
31+
### Run Headed Component Tests with [Cypress Component Testing](https://on.cypress.io/component)
32+
33+
```sh
34+
pnpm test:unit # or `pnpm test:unit:ci` for headless testing
35+
```
36+
37+
### Run End-to-End Tests with [Cypress](https://www.cypress.io/)
38+
39+
```sh
40+
pnpm build
41+
pnpm test:e2e # or `pnpm test:e2e:ci` for headless testing
42+
```

cypress/cypress.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const { defineConfig } = require('cypress')
2+
3+
module.exports = defineConfig({
4+
e2e: {
5+
specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}',
6+
baseUrl: 'http://localhost:4173'
7+
},
8+
component: {
9+
specPattern: 'src/**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}',
10+
devServer: {
11+
framework: 'vue',
12+
bundler: 'vite'
13+
}
14+
}
15+
})

router-with-tests/cypress/jsconfig.json renamed to cypress/cypress/e2e/jsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"lib": ["es5", "dom"],
55
"types": ["cypress"]
66
},
7-
"include": ["./**/*"]
7+
"include": ["./**/*", "../support/**/*"]
88
}

cypress/cypress/fixtures/example.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "Using fixtures to represent data",
3+
"email": "[email protected]",
4+
"body": "Fixtures are a great way to mock data for responses to routes"
5+
}

cypress/cypress/support/commands.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// ***********************************************
2+
// This example commands.js shows you how to
3+
// create various custom commands and overwrite
4+
// existing commands.
5+
//
6+
// For more comprehensive examples of custom
7+
// commands please read more here:
8+
// https://on.cypress.io/custom-commands
9+
// ***********************************************
10+
//
11+
//
12+
// -- This is a parent command --
13+
// Cypress.Commands.add('login', (email, password) => { ... })
14+
//
15+
//
16+
// -- This is a child command --
17+
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
18+
//
19+
//
20+
// -- This is a dual command --
21+
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
22+
//
23+
//
24+
// -- This will overwrite an existing command --
25+
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<title>Components App</title>
8+
</head>
9+
<body>
10+
<div data-cy-root></div>
11+
</body>
12+
</html>

cypress/cypress/support/component.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// ***********************************************************
2+
// This example support/component.js is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
// Import commands.js using ES2015 syntax:
17+
import './commands'
18+
19+
// Alternatively you can use CommonJS syntax:
20+
// require('./commands')
21+
22+
import { mount } from 'cypress/vue2'
23+
24+
Cypress.Commands.add('mount', mount)
25+
26+
// Example use:
27+
// cy.mount(MyComponent)

cypress/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite App</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.js"></script>
12+
</body>
13+
</html>

cypress/package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "cypress",
3+
"version": "0.0.0",
4+
"scripts": {
5+
"dev": "vite",
6+
"build": "vite build",
7+
"preview": "vite preview --port 4173",
8+
"test:e2e": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress open --e2e'",
9+
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:4173/ 'cypress run --e2e'",
10+
"test:unit": "cypress open --component",
11+
"test:unit:ci": "cypress run --component --quiet --reporter spec"
12+
},
13+
"dependencies": {
14+
"vue": "^2.7.4"
15+
},
16+
"devDependencies": {
17+
"@vitejs/plugin-legacy": "^1.8.2",
18+
"@vitejs/plugin-vue2": "^1.1.2",
19+
"cypress": "^10.3.0",
20+
"start-server-and-test": "^1.14.0",
21+
"vite": "^2.9.14"
22+
}
23+
}

cypress/public/favicon.ico

4.19 KB
Binary file not shown.

cypress/src/App.vue

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<script setup>
2+
import HelloWorld from './components/HelloWorld.vue'
3+
import TheWelcome from './components/TheWelcome.vue'
4+
</script>
5+
6+
<template>
7+
<div id="app">
8+
<header>
9+
<img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" />
10+
11+
<div class="wrapper">
12+
<HelloWorld msg="You did it!" />
13+
</div>
14+
</header>
15+
16+
<main>
17+
<TheWelcome />
18+
</main>
19+
</div>
20+
</template>
21+
22+
<style>
23+
@import './assets/base.css';
24+
25+
#app {
26+
max-width: 1280px;
27+
margin: 0 auto;
28+
padding: 2rem;
29+
30+
font-weight: normal;
31+
}
32+
33+
header {
34+
line-height: 1.5;
35+
}
36+
37+
.logo {
38+
display: block;
39+
margin: 0 auto 2rem;
40+
}
41+
42+
a,
43+
.green {
44+
text-decoration: none;
45+
color: hsla(160, 100%, 37%, 1);
46+
transition: 0.4s;
47+
}
48+
49+
@media (hover: hover) {
50+
a:hover {
51+
background-color: hsla(160, 100%, 37%, 0.2);
52+
}
53+
}
54+
55+
@media (min-width: 1024px) {
56+
body {
57+
display: flex;
58+
place-items: center;
59+
}
60+
61+
#app {
62+
display: grid;
63+
grid-template-columns: 1fr 1fr;
64+
padding: 0 2rem;
65+
}
66+
67+
header {
68+
display: flex;
69+
place-items: center;
70+
padding-right: calc(var(--section-gap) / 2);
71+
}
72+
73+
header .wrapper {
74+
display: flex;
75+
place-items: flex-start;
76+
flex-wrap: wrap;
77+
}
78+
79+
.logo {
80+
margin: 0 2rem 0 0;
81+
}
82+
}
83+
</style>

cypress/src/assets/base.css

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/* color palette from <https://github.com/vuejs/theme> */
2+
:root {
3+
--vt-c-white: #ffffff;
4+
--vt-c-white-soft: #f8f8f8;
5+
--vt-c-white-mute: #f2f2f2;
6+
7+
--vt-c-black: #181818;
8+
--vt-c-black-soft: #222222;
9+
--vt-c-black-mute: #282828;
10+
11+
--vt-c-indigo: #2c3e50;
12+
13+
--vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
14+
--vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
15+
--vt-c-divider-dadarkrk-1: rgba(84, 84, 84, 0.65);
16+
--vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
17+
18+
--vt-c-text-light-1: var(--vt-c-indigo);
19+
--vt-c-text-light-2: rgba(60, 60, 60, 0.66);
20+
--vt-c-text-dark-1: var(--vt-c-white);
21+
--vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
22+
}
23+
24+
/* semantic color variables for this project */
25+
:root {
26+
--color-background: var(--vt-c-white);
27+
--color-background-soft: var(--vt-c-white-soft);
28+
--color-background-mute: var(--vt-c-white-mute);
29+
30+
--color-border: var(--vt-c-divider-light-2);
31+
--color-border-hover: var(--vt-c-divider-light-1);
32+
33+
--color-heading: var(--vt-c-text-light-1);
34+
--color-text: var(--vt-c-text-light-1);
35+
36+
--section-gap: 160px;
37+
}
38+
39+
@media (prefers-color-scheme: dark) {
40+
:root {
41+
--color-background: var(--vt-c-black);
42+
--color-background-soft: var(--vt-c-black-soft);
43+
--color-background-mute: var(--vt-c-black-mute);
44+
45+
--color-border: var(--vt-c-divider-dark-2);
46+
--color-border-hover: var(--vt-c-divider-dark-1);
47+
48+
--color-heading: var(--vt-c-text-dark-1);
49+
--color-text: var(--vt-c-text-dark-2);
50+
}
51+
}
52+
53+
*,
54+
*::before,
55+
*::after {
56+
box-sizing: border-box;
57+
margin: 0;
58+
position: relative;
59+
font-weight: normal;
60+
}
61+
62+
body {
63+
min-height: 100vh;
64+
color: var(--color-text);
65+
background: var(--color-background);
66+
transition: color 0.5s, background-color 0.5s;
67+
line-height: 1.6;
68+
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
69+
Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
70+
font-size: 15px;
71+
text-rendering: optimizeLegibility;
72+
-webkit-font-smoothing: antialiased;
73+
-moz-osx-font-smoothing: grayscale;
74+
}

cypress/src/assets/logo.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)