create-vue 1.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/outfile.cjs +5700 -0
- package/package.json +42 -31
- package/template/base/.vscode/extensions.json +3 -0
- package/template/base/_gitignore +27 -0
- package/template/base/index.html +13 -0
- package/template/base/package.json +19 -0
- package/template/base/public/favicon.ico +0 -0
- package/template/base/vite.config.js +25 -0
- package/template/code/default/cypress/integration/example.spec.js +8 -0
- package/template/code/default/src/App.vue +83 -0
- package/template/code/default/src/assets/base.css +74 -0
- package/template/code/default/src/assets/logo.svg +1 -0
- package/template/code/default/src/components/HelloWorld.vue +44 -0
- package/template/code/default/src/components/TheWelcome.vue +86 -0
- package/template/code/default/src/components/WelcomeItem.vue +86 -0
- package/template/code/default/src/components/__tests__/HelloWorld.spec.js +13 -0
- package/template/code/default/src/components/icons/IconCommunity.vue +7 -0
- package/template/code/default/src/components/icons/IconDocumentation.vue +7 -0
- package/template/code/default/src/components/icons/IconEcosystem.vue +7 -0
- package/template/code/default/src/components/icons/IconSupport.vue +7 -0
- package/template/code/default/src/components/icons/IconTooling.vue +19 -0
- package/template/code/router/cypress/integration/example.spec.js +13 -0
- package/template/code/router/src/App.vue +120 -0
- package/template/code/router/src/assets/base.css +74 -0
- package/template/code/router/src/assets/logo.svg +1 -0
- package/template/code/router/src/components/HelloWorld.vue +44 -0
- package/template/code/router/src/components/TheWelcome.vue +86 -0
- package/template/code/router/src/components/WelcomeItem.vue +86 -0
- package/template/code/router/src/components/__tests__/HelloWorld.spec.js +13 -0
- package/template/code/router/src/components/icons/IconCommunity.vue +7 -0
- package/template/code/router/src/components/icons/IconDocumentation.vue +7 -0
- package/template/code/router/src/components/icons/IconEcosystem.vue +7 -0
- package/template/code/router/src/components/icons/IconSupport.vue +7 -0
- package/template/code/router/src/components/icons/IconTooling.vue +19 -0
- package/template/code/router/src/router/index.js +27 -0
- package/template/code/router/src/views/AboutView.vue +15 -0
- package/template/code/router/src/views/HomeView.vue +9 -0
- package/template/code/typescript-default/cypress/integration/example.spec.ts +8 -0
- package/template/code/typescript-default/src/App.vue +83 -0
- package/template/code/typescript-default/src/assets/base.css +74 -0
- package/template/code/typescript-default/src/assets/logo.svg +1 -0
- package/template/code/typescript-default/src/components/HelloWorld.vue +41 -0
- package/template/code/typescript-default/src/components/TheWelcome.vue +86 -0
- package/template/code/typescript-default/src/components/WelcomeItem.vue +86 -0
- package/template/code/typescript-default/src/components/__tests__/HelloWorld.spec.ts +13 -0
- package/template/code/typescript-default/src/components/icons/IconCommunity.vue +7 -0
- package/template/code/typescript-default/src/components/icons/IconDocumentation.vue +7 -0
- package/template/code/typescript-default/src/components/icons/IconEcosystem.vue +7 -0
- package/template/code/typescript-default/src/components/icons/IconSupport.vue +7 -0
- package/template/code/typescript-default/src/components/icons/IconTooling.vue +19 -0
- package/template/code/typescript-router/cypress/integration/example.spec.ts +13 -0
- package/template/code/typescript-router/src/App.vue +120 -0
- package/template/code/typescript-router/src/assets/base.css +74 -0
- package/template/code/typescript-router/src/assets/logo.svg +1 -0
- package/template/code/typescript-router/src/components/HelloWorld.vue +41 -0
- package/template/code/typescript-router/src/components/TheWelcome.vue +86 -0
- package/template/code/typescript-router/src/components/WelcomeItem.vue +86 -0
- package/template/code/typescript-router/src/components/__tests__/HelloWorld.spec.ts +13 -0
- package/template/code/typescript-router/src/components/icons/IconCommunity.vue +7 -0
- package/template/code/typescript-router/src/components/icons/IconDocumentation.vue +7 -0
- package/template/code/typescript-router/src/components/icons/IconEcosystem.vue +7 -0
- package/template/code/typescript-router/src/components/icons/IconSupport.vue +7 -0
- package/template/code/typescript-router/src/components/icons/IconTooling.vue +19 -0
- package/template/code/typescript-router/src/router/index.ts +27 -0
- package/template/code/typescript-router/src/views/AboutView.vue +15 -0
- package/template/code/typescript-router/src/views/HomeView.vue +9 -0
- package/template/config/cypress/cypress/fixtures/example.json +5 -0
- package/template/config/cypress/cypress/jsconfig.json +8 -0
- package/template/config/cypress/cypress/plugins/index.js +28 -0
- package/template/config/cypress/cypress/support/commands.js +25 -0
- package/template/config/cypress/cypress/support/index.js +20 -0
- package/template/config/cypress/cypress.json +7 -0
- package/template/config/cypress/package.json +14 -0
- package/template/config/pinia/package.json +5 -0
- package/template/config/pinia/src/stores/counter.js +16 -0
- package/template/config/router/package.json +5 -0
- package/template/config/typescript/env.d.ts +16 -0
- package/template/config/typescript/package.json +11 -0
- package/template/config/typescript/tsconfig.json +24 -0
- package/template/entry/default/src/main.js +12 -0
- package/template/entry/pinia/src/main.js +15 -0
- package/template/entry/router/src/main.js +14 -0
- package/template/entry/router-and-pinia/src/main.js +17 -0
- package/src/config/index.js +0 -33
- package/src/main.js +0 -270
- package/src/render.js +0 -30
- package/yarn.lock +0 -1011
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import WelcomeItem from './WelcomeItem.vue'
|
|
3
|
+
import DocumentationIcon from './icons/IconDocumentation.vue'
|
|
4
|
+
import ToolingIcon from './icons/IconTooling.vue'
|
|
5
|
+
import EcosystemIcon from './icons/IconEcosystem.vue'
|
|
6
|
+
import CommunityIcon from './icons/IconCommunity.vue'
|
|
7
|
+
import SupportIcon from './icons/IconSupport.vue'
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div>
|
|
12
|
+
<WelcomeItem>
|
|
13
|
+
<template #icon>
|
|
14
|
+
<DocumentationIcon />
|
|
15
|
+
</template>
|
|
16
|
+
<template #heading>Documentation</template>
|
|
17
|
+
|
|
18
|
+
Vue’s
|
|
19
|
+
<a target="_blank" href="https://v2.vuejs.org/">official documentation</a>
|
|
20
|
+
provides you with all information you need to get started.
|
|
21
|
+
</WelcomeItem>
|
|
22
|
+
|
|
23
|
+
<WelcomeItem>
|
|
24
|
+
<template #icon>
|
|
25
|
+
<ToolingIcon />
|
|
26
|
+
</template>
|
|
27
|
+
<template #heading>Tooling</template>
|
|
28
|
+
|
|
29
|
+
This project is served and bundled with
|
|
30
|
+
<a href="https://vitejs.dev/guide/features.html" target="_blank">Vite</a>. The recommended IDE
|
|
31
|
+
setup is <a href="https://code.visualstudio.com/" target="_blank">VSCode</a> +
|
|
32
|
+
<a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>. If you need to
|
|
33
|
+
test your components and web pages, check out
|
|
34
|
+
<a href="https://www.cypress.io/" target="_blank">Cypress</a> and
|
|
35
|
+
<a href="https://docs.cypress.io/guides/component-testing/introduction" target="_blank"
|
|
36
|
+
>Cypress Component Testing</a
|
|
37
|
+
>.
|
|
38
|
+
|
|
39
|
+
<br />
|
|
40
|
+
|
|
41
|
+
More instructions are available in <code>README.md</code>.
|
|
42
|
+
</WelcomeItem>
|
|
43
|
+
|
|
44
|
+
<WelcomeItem>
|
|
45
|
+
<template #icon>
|
|
46
|
+
<EcosystemIcon />
|
|
47
|
+
</template>
|
|
48
|
+
<template #heading>Ecosystem</template>
|
|
49
|
+
|
|
50
|
+
Get official tools and libraries for your project:
|
|
51
|
+
<a target="_blank" href="https://pinia.vuejs.org/">Pinia</a>,
|
|
52
|
+
<a target="_blank" href="https://v3.router.vuejs.org/">Vue Router</a>,
|
|
53
|
+
<a target="_blank" href="https://vue-test-utils.vuejs.org/">Vue Test Utils</a>, and
|
|
54
|
+
<a target="_blank" href="https://github.com/vuejs/devtools">Vue Dev Tools</a>. If you need
|
|
55
|
+
more resources, we suggest paying
|
|
56
|
+
<a target="_blank" href="https://github.com/vuejs/awesome-vue">Awesome Vue</a>
|
|
57
|
+
a visit.
|
|
58
|
+
</WelcomeItem>
|
|
59
|
+
|
|
60
|
+
<WelcomeItem>
|
|
61
|
+
<template #icon>
|
|
62
|
+
<CommunityIcon />
|
|
63
|
+
</template>
|
|
64
|
+
<template #heading>Community</template>
|
|
65
|
+
|
|
66
|
+
Got stuck? Ask your question on
|
|
67
|
+
<a target="_blank" href="https://chat.vuejs.org">Vue Land</a>, our official Discord server, or
|
|
68
|
+
<a target="_blank" href="https://stackoverflow.com/questions/tagged/vue.js">StackOverflow</a>.
|
|
69
|
+
You should also subscribe to
|
|
70
|
+
<a target="_blank" href="https://news.vuejs.org">our mailing list</a> and follow the official
|
|
71
|
+
<a target="_blank" href="https://twitter.com/vuejs">@vuejs</a>
|
|
72
|
+
twitter account for latest news in the Vue world.
|
|
73
|
+
</WelcomeItem>
|
|
74
|
+
|
|
75
|
+
<WelcomeItem>
|
|
76
|
+
<template #icon>
|
|
77
|
+
<SupportIcon />
|
|
78
|
+
</template>
|
|
79
|
+
<template #heading>Support Vue</template>
|
|
80
|
+
|
|
81
|
+
As an independent project, Vue relies on community backing for its sustainability. You can
|
|
82
|
+
help us by
|
|
83
|
+
<a target="_blank" href="https://vuejs.org/sponsor/">becoming a sponsor</a>.
|
|
84
|
+
</WelcomeItem>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="item">
|
|
3
|
+
<i>
|
|
4
|
+
<slot name="icon"></slot>
|
|
5
|
+
</i>
|
|
6
|
+
<div class="details">
|
|
7
|
+
<h3>
|
|
8
|
+
<slot name="heading"></slot>
|
|
9
|
+
</h3>
|
|
10
|
+
<slot></slot>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<style scoped>
|
|
16
|
+
.item {
|
|
17
|
+
margin-top: 2rem;
|
|
18
|
+
display: flex;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.details {
|
|
22
|
+
flex: 1;
|
|
23
|
+
margin-left: 1rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
i {
|
|
27
|
+
display: flex;
|
|
28
|
+
place-items: center;
|
|
29
|
+
place-content: center;
|
|
30
|
+
width: 32px;
|
|
31
|
+
height: 32px;
|
|
32
|
+
|
|
33
|
+
color: var(--color-text);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
h3 {
|
|
37
|
+
font-size: 1.2rem;
|
|
38
|
+
font-weight: 500;
|
|
39
|
+
margin-bottom: 0.4rem;
|
|
40
|
+
color: var(--color-heading);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (min-width: 1024px) {
|
|
44
|
+
.item {
|
|
45
|
+
margin-top: 0;
|
|
46
|
+
padding: 0.4rem 0 1rem calc(var(--section-gap) / 2);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
i {
|
|
50
|
+
top: calc(50% - 25px);
|
|
51
|
+
left: -26px;
|
|
52
|
+
position: absolute;
|
|
53
|
+
border: 1px solid var(--color-border);
|
|
54
|
+
background: var(--color-background);
|
|
55
|
+
border-radius: 8px;
|
|
56
|
+
width: 50px;
|
|
57
|
+
height: 50px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.item:before {
|
|
61
|
+
content: ' ';
|
|
62
|
+
border-left: 1px solid var(--color-border);
|
|
63
|
+
position: absolute;
|
|
64
|
+
left: 0;
|
|
65
|
+
bottom: calc(50% + 25px);
|
|
66
|
+
height: calc(50% - 25px);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.item:after {
|
|
70
|
+
content: ' ';
|
|
71
|
+
border-left: 1px solid var(--color-border);
|
|
72
|
+
position: absolute;
|
|
73
|
+
left: 0;
|
|
74
|
+
top: calc(50% + 25px);
|
|
75
|
+
height: calc(50% - 25px);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.item:first-of-type:before {
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.item:last-of-type:after {
|
|
83
|
+
display: none;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mount } from '@cypress/vue'
|
|
2
|
+
import HelloWorld from '../HelloWorld.vue'
|
|
3
|
+
|
|
4
|
+
describe('HelloWorld', () => {
|
|
5
|
+
it('playground', () => {
|
|
6
|
+
mount(HelloWorld, { propsData: { msg: 'Hello Cypress' } })
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
it('renders properly', () => {
|
|
10
|
+
mount(HelloWorld, { propsData: { msg: 'Hello Cypress' } })
|
|
11
|
+
cy.get('h1').should('contain', 'Hello Cypress')
|
|
12
|
+
})
|
|
13
|
+
})
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
|
|
3
|
+
<path
|
|
4
|
+
d="M15 4a1 1 0 1 0 0 2V4zm0 11v-1a1 1 0 0 0-1 1h1zm0 4l-.707.707A1 1 0 0 0 16 19h-1zm-4-4l.707-.707A1 1 0 0 0 11 14v1zm-4.707-1.293a1 1 0 0 0-1.414 1.414l1.414-1.414zm-.707.707l-.707-.707.707.707zM9 11v-1a1 1 0 0 0-.707.293L9 11zm-4 0h1a1 1 0 0 0-1-1v1zm0 4H4a1 1 0 0 0 1.707.707L5 15zm10-9h2V4h-2v2zm2 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2zm1 1v6h2V7h-2zm0 6a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2zm-1 1h-2v2h2v-2zm-3 1v4h2v-4h-2zm1.707 3.293l-4-4-1.414 1.414 4 4 1.414-1.414zM11 14H7v2h4v-2zm-4 0c-.276 0-.525-.111-.707-.293l-1.414 1.414C5.42 15.663 6.172 16 7 16v-2zm-.707 1.121l3.414-3.414-1.414-1.414-3.414 3.414 1.414 1.414zM9 12h4v-2H9v2zm4 0a3 3 0 0 0 3-3h-2a1 1 0 0 1-1 1v2zm3-3V3h-2v6h2zm0-6a3 3 0 0 0-3-3v2a1 1 0 0 1 1 1h2zm-3-3H3v2h10V0zM3 0a3 3 0 0 0-3 3h2a1 1 0 0 1 1-1V0zM0 3v6h2V3H0zm0 6a3 3 0 0 0 3 3v-2a1 1 0 0 1-1-1H0zm3 3h2v-2H3v2zm1-1v4h2v-4H4zm1.707 4.707l.586-.586-1.414-1.414-.586.586 1.414 1.414z"
|
|
5
|
+
/>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" fill="currentColor">
|
|
3
|
+
<path
|
|
4
|
+
d="M11 2.253a1 1 0 1 0-2 0h2zm-2 13a1 1 0 1 0 2 0H9zm.447-12.167a1 1 0 1 0 1.107-1.666L9.447 3.086zM1 2.253L.447 1.42A1 1 0 0 0 0 2.253h1zm0 13H0a1 1 0 0 0 1.553.833L1 15.253zm8.447.833a1 1 0 1 0 1.107-1.666l-1.107 1.666zm0-14.666a1 1 0 1 0 1.107 1.666L9.447 1.42zM19 2.253h1a1 1 0 0 0-.447-.833L19 2.253zm0 13l-.553.833A1 1 0 0 0 20 15.253h-1zm-9.553-.833a1 1 0 1 0 1.107 1.666L9.447 14.42zM9 2.253v13h2v-13H9zm1.553-.833C9.203.523 7.42 0 5.5 0v2c1.572 0 2.961.431 3.947 1.086l1.107-1.666zM5.5 0C3.58 0 1.797.523.447 1.42l1.107 1.666C2.539 2.431 3.928 2 5.5 2V0zM0 2.253v13h2v-13H0zm1.553 13.833C2.539 15.431 3.928 15 5.5 15v-2c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM5.5 15c1.572 0 2.961.431 3.947 1.086l1.107-1.666C9.203 13.523 7.42 13 5.5 13v2zm5.053-11.914C11.539 2.431 12.928 2 14.5 2V0c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM14.5 2c1.573 0 2.961.431 3.947 1.086l1.107-1.666C18.203.523 16.421 0 14.5 0v2zm3.5.253v13h2v-13h-2zm1.553 12.167C18.203 13.523 16.421 13 14.5 13v2c1.573 0 2.961.431 3.947 1.086l1.107-1.666zM14.5 13c-1.92 0-3.703.523-5.053 1.42l1.107 1.666C11.539 15.431 12.928 15 14.5 15v-2z"
|
|
5
|
+
/>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" fill="currentColor">
|
|
3
|
+
<path
|
|
4
|
+
d="M11.447 8.894a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm0 1.789a1 1 0 1 0 .894-1.789l-.894 1.789zM7.447 7.106a1 1 0 1 0-.894 1.789l.894-1.789zM10 9a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0H8zm9.447-5.606a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm2 .789a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zM18 5a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0h-2zm-5.447-4.606a1 1 0 1 0 .894-1.789l-.894 1.789zM9 1l.447-.894a1 1 0 0 0-.894 0L9 1zm-2.447.106a1 1 0 1 0 .894 1.789l-.894-1.789zm-6 3a1 1 0 1 0 .894 1.789L.553 4.106zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zm-2-.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 2.789a1 1 0 1 0 .894-1.789l-.894 1.789zM2 5a1 1 0 1 0-2 0h2zM0 7.5a1 1 0 1 0 2 0H0zm8.553 12.394a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 1a1 1 0 1 0 .894 1.789l-.894-1.789zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zM8 19a1 1 0 1 0 2 0H8zm2-2.5a1 1 0 1 0-2 0h2zm-7.447.394a1 1 0 1 0 .894-1.789l-.894 1.789zM1 15H0a1 1 0 0 0 .553.894L1 15zm1-2.5a1 1 0 1 0-2 0h2zm12.553 2.606a1 1 0 1 0 .894 1.789l-.894-1.789zM17 15l.447.894A1 1 0 0 0 18 15h-1zm1-2.5a1 1 0 1 0-2 0h2zm-7.447-5.394l-2 1 .894 1.789 2-1-.894-1.789zm-1.106 1l-2-1-.894 1.789 2 1 .894-1.789zM8 9v2.5h2V9H8zm8.553-4.894l-2 1 .894 1.789 2-1-.894-1.789zm.894 0l-2-1-.894 1.789 2 1 .894-1.789zM16 5v2.5h2V5h-2zm-4.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zm-2.894-1l-2 1 .894 1.789 2-1L8.553.106zM1.447 5.894l2-1-.894-1.789-2 1 .894 1.789zm-.894 0l2 1 .894-1.789-2-1-.894 1.789zM0 5v2.5h2V5H0zm9.447 13.106l-2-1-.894 1.789 2 1 .894-1.789zm0 1.789l2-1-.894-1.789-2 1 .894 1.789zM10 19v-2.5H8V19h2zm-6.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zM2 15v-2.5H0V15h2zm13.447 1.894l2-1-.894-1.789-2 1 .894 1.789zM18 15v-2.5h-2V15h2z"
|
|
5
|
+
/>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
|
|
3
|
+
<path
|
|
4
|
+
d="M10 3.22l-.61-.6a5.5 5.5 0 0 0-7.666.105 5.5 5.5 0 0 0-.114 7.665L10 18.78l8.39-8.4a5.5 5.5 0 0 0-.114-7.665 5.5 5.5 0 0 0-7.666-.105l-.61.61z"
|
|
5
|
+
/>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- This icon is from <https://github.com/Templarian/MaterialDesign>, distributed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0) license-->
|
|
2
|
+
<template>
|
|
3
|
+
<svg
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
6
|
+
aria-hidden="true"
|
|
7
|
+
role="img"
|
|
8
|
+
class="iconify iconify--mdi"
|
|
9
|
+
width="24"
|
|
10
|
+
height="24"
|
|
11
|
+
preserveAspectRatio="xMidYMid meet"
|
|
12
|
+
viewBox="0 0 24 24"
|
|
13
|
+
>
|
|
14
|
+
<path
|
|
15
|
+
d="M20 18v-4h-3v1h-2v-1H9v1H7v-1H4v4h16M6.33 8l-1.74 4H7v-1h2v1h6v-1h2v1h2.41l-1.74-4H6.33M9 5v1h6V5H9m12.84 7.61c.1.22.16.48.16.8V18c0 .53-.21 1-.6 1.41c-.4.4-.85.59-1.4.59H4c-.55 0-1-.19-1.4-.59C2.21 19 2 18.53 2 18v-4.59c0-.32.06-.58.16-.8L4.5 7.22C4.84 6.41 5.45 6 6.33 6H7V5c0-.55.18-1 .57-1.41C7.96 3.2 8.44 3 9 3h6c.56 0 1.04.2 1.43.59c.39.41.57.86.57 1.41v1h.67c.88 0 1.49.41 1.83 1.22l2.34 5.39z"
|
|
16
|
+
fill="currentColor"
|
|
17
|
+
></path>
|
|
18
|
+
</svg>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import VueRouter from 'vue-router'
|
|
3
|
+
import HomeView from '../views/HomeView.vue'
|
|
4
|
+
|
|
5
|
+
Vue.use(VueRouter)
|
|
6
|
+
|
|
7
|
+
const router = new VueRouter({
|
|
8
|
+
mode: 'history',
|
|
9
|
+
base: import.meta.env.BASE_URL,
|
|
10
|
+
routes: [
|
|
11
|
+
{
|
|
12
|
+
path: '/',
|
|
13
|
+
name: 'home',
|
|
14
|
+
component: HomeView
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
path: '/about',
|
|
18
|
+
name: 'about',
|
|
19
|
+
// route level code-splitting
|
|
20
|
+
// this generates a separate chunk (About.[hash].js) for this route
|
|
21
|
+
// which is lazy-loaded when the route is visited.
|
|
22
|
+
component: () => import('../views/AboutView.vue')
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
export default router
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
// ***********************************************************
|
|
3
|
+
// This example plugins/index.js can be used to load plugins
|
|
4
|
+
//
|
|
5
|
+
// You can change the location of this file or turn off loading
|
|
6
|
+
// the plugins file with the 'pluginsFile' configuration option.
|
|
7
|
+
//
|
|
8
|
+
// You can read more here:
|
|
9
|
+
// https://on.cypress.io/plugins-guide
|
|
10
|
+
// ***********************************************************
|
|
11
|
+
|
|
12
|
+
// This function is called when a project is opened or re-opened (e.g. due to
|
|
13
|
+
// the project's config changing)
|
|
14
|
+
|
|
15
|
+
const { startDevServer } = require('@cypress/vite-dev-server')
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @type {Cypress.PluginConfig}
|
|
19
|
+
*/
|
|
20
|
+
// eslint-disable-next-line no-unused-vars
|
|
21
|
+
module.exports = (on, config) => {
|
|
22
|
+
// `on` is used to hook into various events Cypress emits
|
|
23
|
+
// `config` is the resolved Cypress config
|
|
24
|
+
on('dev-server:start', (options) => {
|
|
25
|
+
return startDevServer({ options })
|
|
26
|
+
})
|
|
27
|
+
return config
|
|
28
|
+
}
|
|
@@ -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) => { ... })
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// ***********************************************************
|
|
2
|
+
// This example support/index.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')
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scripts": {
|
|
3
|
+
"test:unit": "cypress open-ct",
|
|
4
|
+
"test:unit:ci": "cypress run-ct --quiet --reporter spec",
|
|
5
|
+
"test:e2e": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress open'",
|
|
6
|
+
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress run'"
|
|
7
|
+
},
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"@cypress/vite-dev-server": "^2.2.1",
|
|
10
|
+
"@cypress/vue": "^2.2.4",
|
|
11
|
+
"cypress": "^9.1.0",
|
|
12
|
+
"start-server-and-test": "^1.14.0"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineStore } from 'pinia'
|
|
2
|
+
|
|
3
|
+
export const useCounterStore = defineStore({
|
|
4
|
+
id: 'counter',
|
|
5
|
+
state: () => ({
|
|
6
|
+
counter: 0
|
|
7
|
+
}),
|
|
8
|
+
getters: {
|
|
9
|
+
doubleCount: (state) => state.counter * 2
|
|
10
|
+
},
|
|
11
|
+
actions: {
|
|
12
|
+
increment() {
|
|
13
|
+
this.counter++
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
})
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module '*.vue' {
|
|
4
|
+
import Vue from 'vue'
|
|
5
|
+
export default Vue
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare global {
|
|
9
|
+
namespace JSX {
|
|
10
|
+
interface Element extends VNode {}
|
|
11
|
+
interface ElementClass extends Vue {}
|
|
12
|
+
interface IntrinsicElements {
|
|
13
|
+
[elem: string]: any
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"baseUrl": "./",
|
|
4
|
+
"target": "esnext",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"module": "esnext",
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"isolatedModules": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"jsx": "preserve",
|
|
11
|
+
"sourceMap": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"paths": {
|
|
15
|
+
"@/*": ["src/*"]
|
|
16
|
+
},
|
|
17
|
+
"lib": ["esnext", "dom", "dom.iterable", "scripthost"],
|
|
18
|
+
"skipLibCheck": true
|
|
19
|
+
},
|
|
20
|
+
"vueCompilerOptions": {
|
|
21
|
+
"experimentalCompatMode": 2
|
|
22
|
+
},
|
|
23
|
+
"include": ["vite.config.*", "env.d.ts", "src/**/*", "src/**/*.vue"]
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import VueCompositionAPI from '@vue/composition-api'
|
|
3
|
+
import { createPinia, PiniaVuePlugin } from 'pinia'
|
|
4
|
+
|
|
5
|
+
import App from './App.vue'
|
|
6
|
+
|
|
7
|
+
Vue.use(VueCompositionAPI)
|
|
8
|
+
Vue.use(PiniaVuePlugin)
|
|
9
|
+
|
|
10
|
+
const app = new Vue({
|
|
11
|
+
pinia: createPinia(),
|
|
12
|
+
render: (h) => h(App)
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
app.$mount('#app')
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import VueCompositionAPI from '@vue/composition-api'
|
|
3
|
+
|
|
4
|
+
import App from './App.vue'
|
|
5
|
+
import router from './router'
|
|
6
|
+
|
|
7
|
+
Vue.use(VueCompositionAPI)
|
|
8
|
+
|
|
9
|
+
const app = new Vue({
|
|
10
|
+
router,
|
|
11
|
+
render: (h) => h(App)
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
app.$mount('#app')
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import VueCompositionAPI from '@vue/composition-api'
|
|
3
|
+
import { createPinia, PiniaVuePlugin } from 'pinia'
|
|
4
|
+
|
|
5
|
+
import App from './App.vue'
|
|
6
|
+
import router from './router'
|
|
7
|
+
|
|
8
|
+
Vue.use(VueCompositionAPI)
|
|
9
|
+
Vue.use(PiniaVuePlugin)
|
|
10
|
+
|
|
11
|
+
const app = new Vue({
|
|
12
|
+
router,
|
|
13
|
+
pinia: createPinia(),
|
|
14
|
+
render: (h) => h(App)
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
app.$mount('#app')
|
package/src/config/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author [小缘]
|
|
3
|
-
* @email [1440806569@qq.com]
|
|
4
|
-
* @create date 2017-09-18 05:02:53
|
|
5
|
-
* @modify date 2017-09-18 05:02:53
|
|
6
|
-
* @desc [配置文件]
|
|
7
|
-
*/
|
|
8
|
-
const userHome = require('user-home');
|
|
9
|
-
const path = require('path');
|
|
10
|
-
let templateName = '.create-vue-templates';
|
|
11
|
-
|
|
12
|
-
let config = {
|
|
13
|
-
// 模板文件名
|
|
14
|
-
templateName,
|
|
15
|
-
// 模板路径
|
|
16
|
-
templatePath: path.join(userHome, templateName),
|
|
17
|
-
// 模板下载地址
|
|
18
|
-
templateDownloadPath: 'hxlovexc/create-vue-template',
|
|
19
|
-
templateList: [
|
|
20
|
-
'package.json',
|
|
21
|
-
'/config/index.js',
|
|
22
|
-
'/build/webpack-base-config.js',
|
|
23
|
-
'/build/webpack-dev-config.js',
|
|
24
|
-
'/build/webpack-build-config.js',
|
|
25
|
-
'src/app.vue',
|
|
26
|
-
'/build/utils.js',
|
|
27
|
-
'/src/main.js',
|
|
28
|
-
'/.eslintignore',
|
|
29
|
-
'/src/views/index/index.js'
|
|
30
|
-
]
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
module.exports = config;
|