@farris/cli 2.3.2 → 2.3.4
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/lib/commands/add-app.js +1 -1
- package/lib/commands/add-app.js.map +1 -1
- package/lib/commands/add-lib.js +1 -1
- package/lib/commands/add-lib.js.map +1 -1
- package/lib/commands/add-project.js +2 -2
- package/lib/commands/add-project.js.map +1 -1
- package/lib/commands/build-components.js +4 -1
- package/lib/commands/build-components.js.map +1 -1
- package/lib/commands/create.js +8 -9
- package/lib/commands/create.js.map +1 -1
- package/lib/commands/dev-serve.js +1 -1
- package/lib/commands/dev-serve.js.map +1 -1
- package/lib/common/get-vite-config.js +64 -2
- package/lib/common/get-vite-config.js.map +1 -1
- package/lib/common/project-layout.js +53 -12
- package/lib/common/project-layout.js.map +1 -1
- package/lib/common/safety.js +4 -4
- package/lib/common/safety.js.map +1 -1
- package/lib/common/verifier.js +21 -14
- package/lib/common/verifier.js.map +1 -1
- package/lib/common/workspace-contract.js +28 -3
- package/lib/common/workspace-contract.js.map +1 -1
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/lib/plugins/mock.js +293 -0
- package/lib/plugins/mock.js.map +1 -0
- package/package.json +1 -1
- package/templates/create/AGENTS.md +28 -4
- package/templates/create/README.md +2 -0
- package/templates/lib/components/index.ts +3 -10
- package/templates/lib/src/App.vue +2 -4
- package/templates/lib/test/index.spec.ts +9 -0
- package/templates/lib/test/index.spec.tsx +9 -0
- package/templates/mobile/farris.config.mjs +7 -1
- package/templates/mobile/mock/README.md +34 -0
- package/templates/mobile/src/App.tsx +21 -0
- package/templates/mobile/src/components/TheButton.tsx +9 -0
- package/templates/mobile/src/main.ts +1 -1
- package/templates/mobile/src/router/index.ts +2 -2
- package/templates/mobile/src/views/AboutView.tsx +12 -0
- package/templates/mobile/src/views/HomeView.tsx +13 -0
- package/templates/mobile/test/src/components/TheButton.spec.ts +2 -2
- package/templates/mobile/test/src/components/TheButton.spec.tsx +2 -2
- package/templates/web/farris.config.mjs +7 -1
- package/templates/web/mock/README.md +34 -0
- package/templates/web/src/App.tsx +25 -0
- package/templates/web/src/components/TheButton.tsx +9 -0
- package/templates/web/src/main.ts +1 -1
- package/templates/web/src/router/index.ts +2 -2
- package/templates/web/src/views/AboutView.tsx +12 -0
- package/templates/web/src/views/HomeView.tsx +13 -0
- package/templates/web/test/src/components/TheButton.spec.ts +2 -2
- package/templates/web/test/src/components/TheButton.spec.tsx +2 -2
- package/templates/lib/components/button/index.ts +0 -7
- package/templates/lib/components/button/src/button.scss +0 -10
- package/templates/lib/components/button/src/button.vue +0 -12
- package/templates/lib/test/components/button/button.spec.ts +0 -11
- package/templates/lib/test/components/button/button.spec.tsx +0 -11
- package/templates/mobile/src/App.vue +0 -80
- package/templates/mobile/src/components/TheButton.vue +0 -3
- package/templates/mobile/src/views/AboutView.vue +0 -15
- package/templates/mobile/src/views/HomeView.vue +0 -9
- package/templates/web/src/App.vue +0 -84
- package/templates/web/src/components/TheButton.vue +0 -3
- package/templates/web/src/views/AboutView.vue +0 -15
- package/templates/web/src/views/HomeView.vue +0 -9
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { RouterLink, RouterView } from 'vue-router';
|
|
3
|
-
import { setupMicroAppContext } from './micro/context';
|
|
4
|
-
|
|
5
|
-
// 微前端环境:订阅主应用下发的上下文(语言 / 主题)
|
|
6
|
-
setupMicroAppContext();
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<header>
|
|
11
|
-
<div class="wrapper">
|
|
12
|
-
<nav>
|
|
13
|
-
<RouterLink to="/">Home</RouterLink>
|
|
14
|
-
<RouterLink to="/about">About</RouterLink>
|
|
15
|
-
</nav>
|
|
16
|
-
</div>
|
|
17
|
-
</header>
|
|
18
|
-
|
|
19
|
-
<RouterView />
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<style scoped>
|
|
23
|
-
header {
|
|
24
|
-
line-height: 1.5;
|
|
25
|
-
max-height: 100vh;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.logo {
|
|
29
|
-
display: block;
|
|
30
|
-
margin: 0 auto 2rem;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
nav {
|
|
34
|
-
width: 100%;
|
|
35
|
-
font-size: 12px;
|
|
36
|
-
text-align: center;
|
|
37
|
-
margin-top: 2rem;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
nav a.router-link-exact-active {
|
|
41
|
-
color: var(--color-text);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
nav a.router-link-exact-active:hover {
|
|
45
|
-
background-color: transparent;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
nav a {
|
|
49
|
-
display: inline-block;
|
|
50
|
-
padding: 0 1rem;
|
|
51
|
-
border-left: 1px solid var(--color-border);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
nav a:first-of-type {
|
|
55
|
-
border: 0;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@media (min-width: 1024px) {
|
|
59
|
-
header {
|
|
60
|
-
display: flex;
|
|
61
|
-
place-items: center;
|
|
62
|
-
padding-right: calc(var(--section-gap) / 2);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.logo {
|
|
66
|
-
margin: 0 2rem 0 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
header .wrapper {
|
|
70
|
-
display: flex;
|
|
71
|
-
place-items: flex-start;
|
|
72
|
-
flex-wrap: wrap;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
nav {
|
|
76
|
-
text-align: left;
|
|
77
|
-
margin-left: -1rem;
|
|
78
|
-
font-size: 1rem;
|
|
79
|
-
|
|
80
|
-
padding: 1rem 0;
|
|
81
|
-
margin-top: 1rem;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
</style>
|