@component-hook/create-app 1.0.4 → 1.1.0
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/README.md +82 -82
- package/package.json +1 -1
- package/template-vue/.github/actions/setup-environment/action.yml +45 -45
- package/template-vue/.github/renovate.json +12 -12
- package/template-vue/.github/workflows/ci.yml +22 -22
- package/template-vue/.github/workflows/deploy.yml +27 -27
- package/template-vue/.github/workflows/preview.yml +17 -17
- package/template-vue/.gitlab/setup.yml +18 -18
- package/template-vue/.husky/commit-msg +3 -3
- package/template-vue/.husky/pre-commit +3 -3
- package/template-vue/.vscode/extensions.json +10 -10
- package/template-vue/.vscode/settings.json +27 -27
- package/template-vue/LICENSE +21 -21
- package/template-vue/README.md.art +100 -100
- package/template-vue/_gitignore +38 -38
- package/template-vue/_gitlab-ci.yml +22 -22
- package/template-vue/index.html.art +26 -26
- package/template-vue/package.json +73 -73
- package/template-vue/public/mockServiceWorker.js +307 -307
- package/template-vue/src/__tests__/e2e/IndexPage.spec.ts +1 -1
- package/template-vue/src/__tests__/setup/unit-test.ts +1 -1
- package/template-vue/src/__tests__/unit/components/indexPage/HelloWorld.test.ts +3 -3
- package/template-vue/src/__tests__/unit/render/index.ts +4 -4
- package/template-vue/src/components.d.ts +14 -14
- package/template-vue/src/locales/en-US.json +3 -3
- package/template-vue/src/locales/zh-TW.json +3 -3
- package/template-vue/src/main.ts +5 -5
- package/template-vue/src/styles/common/all.postcss +1 -1
- package/template-vue/src/styles/common/button.postcss +12 -12
- package/template-vue/src/styles/index.postcss +1 -1
- package/template-vue/src/styles/tailwind.postcss +39 -39
- package/template-vue/src/vite-env.d.ts +12 -12
- package/template-vue/tsconfig.app.json +13 -13
- package/template-vue/tsconfig.json +14 -14
- package/template-vue/tsconfig.node.json +12 -12
- package/template-vue/tsconfig.vitest.json +8 -8
- package/template-vue/vite.config.ts +4 -4
- package/template-vue/vitest.config.ts +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
// Generated by unplugin-vue-components
|
|
4
|
-
// Read more: https://github.com/vuejs/core/pull/3399
|
|
5
|
-
export {}
|
|
6
|
-
|
|
7
|
-
/* prettier-ignore */
|
|
8
|
-
declare module 'vue' {
|
|
9
|
-
export interface GlobalComponents {
|
|
10
|
-
RouterLink: typeof import('vue-router')['RouterLink']
|
|
11
|
-
RouterView: typeof import('vue-router')['RouterView']
|
|
12
|
-
SvgIcon: typeof import('./components/common/SvgIcon.vue')['default']
|
|
13
|
-
}
|
|
14
|
-
}
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
// Generated by unplugin-vue-components
|
|
4
|
+
// Read more: https://github.com/vuejs/core/pull/3399
|
|
5
|
+
export {}
|
|
6
|
+
|
|
7
|
+
/* prettier-ignore */
|
|
8
|
+
declare module 'vue' {
|
|
9
|
+
export interface GlobalComponents {
|
|
10
|
+
RouterLink: typeof import('vue-router')['RouterLink']
|
|
11
|
+
RouterView: typeof import('vue-router')['RouterView']
|
|
12
|
+
SvgIcon: typeof import('./components/common/SvgIcon.vue')['default']
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"language": "English"
|
|
3
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"language": "English"
|
|
3
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"language": "中文"
|
|
3
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"language": "中文"
|
|
3
|
+
}
|
package/template-vue/src/main.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { createApp } from 'vue';
|
|
2
1
|
import { createPinia } from 'pinia';
|
|
3
2
|
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
|
4
|
-
import '
|
|
3
|
+
import { createApp } from 'vue';
|
|
4
|
+
import i18NPlugin from '@/plugins/i18n';
|
|
5
5
|
|
|
6
|
+
import router from '@/router';
|
|
7
|
+
import App from './App.vue';
|
|
8
|
+
import 'virtual:svg-icons-register';
|
|
6
9
|
import '@/styles/tailwind.postcss';
|
|
7
10
|
import '@/styles/index.postcss';
|
|
8
|
-
import App from './App.vue';
|
|
9
|
-
import router from '@/router';
|
|
10
|
-
import i18NPlugin from '@/plugins/i18n';
|
|
11
11
|
|
|
12
12
|
if (process.env.NODE_ENV === 'mockServiceWorker') {
|
|
13
13
|
const { worker } = await import('@/mocks/browser');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import './button.postcss';
|
|
1
|
+
@import './button.postcss';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
button {
|
|
2
|
-
@apply
|
|
3
|
-
rounded-lg
|
|
4
|
-
p-2
|
|
5
|
-
border-[1px]
|
|
6
|
-
border-transparent
|
|
7
|
-
transition-[border-color]
|
|
8
|
-
duration-300
|
|
9
|
-
hover:border-[#646cff]
|
|
10
|
-
focus:outline-4
|
|
11
|
-
focus:outline-[-webkit-focus-ring-color];
|
|
12
|
-
}
|
|
1
|
+
button {
|
|
2
|
+
@apply
|
|
3
|
+
rounded-lg
|
|
4
|
+
p-2
|
|
5
|
+
border-[1px]
|
|
6
|
+
border-transparent
|
|
7
|
+
transition-[border-color]
|
|
8
|
+
duration-300
|
|
9
|
+
hover:border-[#646cff]
|
|
10
|
+
focus:outline-4
|
|
11
|
+
focus:outline-[-webkit-focus-ring-color];
|
|
12
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import './common/all.postcss';
|
|
1
|
+
@import './common/all.postcss';
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
@tailwind base;
|
|
2
|
-
@tailwind components;
|
|
3
|
-
@tailwind utilities;
|
|
4
|
-
|
|
5
|
-
@layer base {
|
|
6
|
-
:root {
|
|
7
|
-
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
8
|
-
line-height: 1.5;
|
|
9
|
-
font-weight: 400;
|
|
10
|
-
|
|
11
|
-
color-scheme: light dark;
|
|
12
|
-
color: rgba(255, 255, 255, 0.87);
|
|
13
|
-
background-color: #242424;
|
|
14
|
-
|
|
15
|
-
font-synthesis: none;
|
|
16
|
-
text-rendering: optimizeLegibility;
|
|
17
|
-
-webkit-font-smoothing: antialiased;
|
|
18
|
-
-moz-osx-font-smoothing: grayscale;
|
|
19
|
-
-webkit-text-size-adjust: 100%;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
body {
|
|
23
|
-
@apply m-0 flex place-items-center min-w-[320px] min-h-screen;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
#app {
|
|
27
|
-
@apply max-w-7xl mx-auto p-8 text-center;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
a {
|
|
31
|
-
@apply font-medium text-[#646cff] decoration-inherit hover:text-[#535bf2];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@media (prefers-color-scheme: light) {
|
|
35
|
-
:root {
|
|
36
|
-
@apply bg-white text-[#213547];
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
:root {
|
|
7
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
8
|
+
line-height: 1.5;
|
|
9
|
+
font-weight: 400;
|
|
10
|
+
|
|
11
|
+
color-scheme: light dark;
|
|
12
|
+
color: rgba(255, 255, 255, 0.87);
|
|
13
|
+
background-color: #242424;
|
|
14
|
+
|
|
15
|
+
font-synthesis: none;
|
|
16
|
+
text-rendering: optimizeLegibility;
|
|
17
|
+
-webkit-font-smoothing: antialiased;
|
|
18
|
+
-moz-osx-font-smoothing: grayscale;
|
|
19
|
+
-webkit-text-size-adjust: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
body {
|
|
23
|
+
@apply m-0 flex place-items-center min-w-[320px] min-h-screen;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
#app {
|
|
27
|
+
@apply max-w-7xl mx-auto p-8 text-center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
a {
|
|
31
|
+
@apply font-medium text-[#646cff] decoration-inherit hover:text-[#535bf2];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media (prefers-color-scheme: light) {
|
|
35
|
+
:root {
|
|
36
|
+
@apply bg-white text-[#213547];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
declare module '*.vue' {
|
|
4
|
-
import { DefineComponent } from 'vue';
|
|
5
|
-
const component: DefineComponent<any, {}, any>;
|
|
6
|
-
export default component;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface ImportMetaEnv extends Readonly<Record<string, string>> {
|
|
10
|
-
readonly VITE_APP_VERSION: string;
|
|
11
|
-
readonly VITE_APP_BUILD_EPOCH?: string;
|
|
12
|
-
}
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module '*.vue' {
|
|
4
|
+
import { DefineComponent } from 'vue';
|
|
5
|
+
const component: DefineComponent<any, {}, any>;
|
|
6
|
+
export default component;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface ImportMetaEnv extends Readonly<Record<string, string>> {
|
|
10
|
+
readonly VITE_APP_VERSION: string;
|
|
11
|
+
readonly VITE_APP_BUILD_EPOCH?: string;
|
|
12
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
-
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
|
4
|
-
"exclude": ["src/**/__tests__/*"],
|
|
5
|
-
"compilerOptions": {
|
|
6
|
-
"composite": true,
|
|
7
|
-
"noEmit": true,
|
|
8
|
-
"baseUrl": "./",
|
|
9
|
-
"paths": {
|
|
10
|
-
"@/*": ["src/*"]
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
+
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
|
4
|
+
"exclude": ["src/**/__tests__/*"],
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"composite": true,
|
|
7
|
+
"noEmit": true,
|
|
8
|
+
"baseUrl": "./",
|
|
9
|
+
"paths": {
|
|
10
|
+
"@/*": ["src/*"]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files": [],
|
|
3
|
-
"references": [
|
|
4
|
-
{
|
|
5
|
-
"path": "./tsconfig.node.json"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"path": "./tsconfig.app.json"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"path": "./tsconfig.vitest.json"
|
|
12
|
-
}
|
|
13
|
-
]
|
|
14
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"files": [],
|
|
3
|
+
"references": [
|
|
4
|
+
{
|
|
5
|
+
"path": "./tsconfig.node.json"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"path": "./tsconfig.app.json"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"path": "./tsconfig.vitest.json"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@tsconfig/node22/tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"composite": true,
|
|
5
|
-
"skipLibCheck": true,
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"moduleResolution": "bundler",
|
|
8
|
-
"resolveJsonModule": true,
|
|
9
|
-
"types": ["node"]
|
|
10
|
-
},
|
|
11
|
-
"include": ["vite.config.ts", "package.json", "vitest.config.ts", "playwright.config.ts"]
|
|
12
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "@tsconfig/node22/tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"composite": true,
|
|
5
|
+
"skipLibCheck": true,
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"moduleResolution": "bundler",
|
|
8
|
+
"resolveJsonModule": true,
|
|
9
|
+
"types": ["node"]
|
|
10
|
+
},
|
|
11
|
+
"include": ["vite.config.ts", "package.json", "vitest.config.ts", "playwright.config.ts"]
|
|
12
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.app.json",
|
|
3
|
-
"exclude": [],
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"composite": true,
|
|
6
|
-
"types": ["node", "vitest/globals"]
|
|
7
|
-
}
|
|
8
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.app.json",
|
|
3
|
+
"exclude": [],
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"composite": true,
|
|
6
|
+
"types": ["node", "vitest/globals"]
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { fileURLToPath, URL } from 'node:url';
|
|
2
1
|
import { dirname, resolve } from 'node:path';
|
|
3
|
-
import {
|
|
2
|
+
import { fileURLToPath, URL } from 'node:url';
|
|
3
|
+
import vueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
|
4
4
|
import vue from '@vitejs/plugin-vue';
|
|
5
|
+
import { visualizer } from 'rollup-plugin-visualizer';
|
|
5
6
|
import Components from 'unplugin-vue-components/vite';
|
|
6
|
-
import
|
|
7
|
+
import { defineConfig } from 'vite';
|
|
7
8
|
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
|
|
8
|
-
import { visualizer } from 'rollup-plugin-visualizer';
|
|
9
9
|
import packageJson from './package.json' with { type: 'json' };
|
|
10
10
|
|
|
11
11
|
process.env.VITE_APP_VERSION = packageJson.version;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="vitest" />
|
|
2
2
|
import { fileURLToPath, URL } from 'node:url';
|
|
3
|
-
import {
|
|
3
|
+
import { defineConfig, mergeConfig } from 'vitest/config';
|
|
4
4
|
import viteConfig from './vite.config';
|
|
5
5
|
|
|
6
6
|
export default mergeConfig(
|