create-lik-app 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +0 -0
- package/dist/index.mjs +119 -0
- package/index.js +3 -0
- package/package.json +39 -0
- package/templates/template-react/.husky/commit-msg +6 -0
- package/templates/template-react/.husky/lintstagedrc.cjs +8 -0
- package/templates/template-react/.husky/pre-commit +10 -0
- package/templates/template-react/.prettierignore +13 -0
- package/templates/template-react/.vscode/extensions.json +5 -0
- package/templates/template-react/README.md +24 -0
- package/templates/template-react/_gitignore +24 -0
- package/templates/template-react/commitlint.config.mjs +28 -0
- package/templates/template-react/config/uno/rules.ts +127 -0
- package/templates/template-react/eslint.config.mjs +44 -0
- package/templates/template-react/index.html +13 -0
- package/templates/template-react/package-lock.json +6460 -0
- package/templates/template-react/package.json +49 -0
- package/templates/template-react/pnpm-lock.yaml +4403 -0
- package/templates/template-react/prettier.config.mjs +11 -0
- package/templates/template-react/public/lic.svg +1263 -0
- package/templates/template-react/public/react.svg +1 -0
- package/templates/template-react/public/vite.svg +1 -0
- package/templates/template-react/src/App.tsx +18 -0
- package/templates/template-react/src/assets/react.svg +1 -0
- package/templates/template-react/src/components/Lic/index.tsx +12 -0
- package/templates/template-react/src/libs/gsap/index.ts +6 -0
- package/templates/template-react/src/main.tsx +12 -0
- package/templates/template-react/src/router/loaders.ts +10 -0
- package/templates/template-react/src/router/routes.tsx +36 -0
- package/templates/template-react/src/store/index.ts +2 -0
- package/templates/template-react/src/store/module/counter.ts +20 -0
- package/templates/template-react/src/store/module/favorite.ts +18 -0
- package/templates/template-react/src/styles/animation.css +8 -0
- package/templates/template-react/src/styles/mian.css +10 -0
- package/templates/template-react/src/styles/variable.css +21 -0
- package/templates/template-react/src/views/About/index.tsx +7 -0
- package/templates/template-react/src/views/Home/components/React/index.tsx +17 -0
- package/templates/template-react/src/views/Home/components/Vite/index.tsx +20 -0
- package/templates/template-react/src/views/Home/index.tsx +59 -0
- package/templates/template-react/src/views/Layout/index.tsx +22 -0
- package/templates/template-react/src/vite-env.d.ts +1 -0
- package/templates/template-react/tsconfig.app.json +36 -0
- package/templates/template-react/tsconfig.json +7 -0
- package/templates/template-react/tsconfig.node.json +24 -0
- package/templates/template-react/uno.config.ts +40 -0
- package/templates/template-react/vite.config.ts +28 -0
@@ -0,0 +1,127 @@
|
|
1
|
+
import type { Rule } from 'unocss'
|
2
|
+
|
3
|
+
const link: Rule[] = [
|
4
|
+
[
|
5
|
+
'linkPrimary',
|
6
|
+
{
|
7
|
+
color: 'var(--lic-color-primary)',
|
8
|
+
'text-decoration': 'none',
|
9
|
+
transition: 'color 0.3s ease'
|
10
|
+
}
|
11
|
+
],
|
12
|
+
[
|
13
|
+
'linkHover',
|
14
|
+
{
|
15
|
+
color: 'var(--lic-color-primary-hover)'
|
16
|
+
}
|
17
|
+
],
|
18
|
+
[
|
19
|
+
'linkActive',
|
20
|
+
{
|
21
|
+
color: 'var(--lic-color-primary-highlight)'
|
22
|
+
}
|
23
|
+
],
|
24
|
+
[
|
25
|
+
'linkVisited',
|
26
|
+
{
|
27
|
+
color: 'var(--lic-color-primary-deep)',
|
28
|
+
'text-decoration': 'underline'
|
29
|
+
}
|
30
|
+
],
|
31
|
+
[
|
32
|
+
'linkDisabledHover',
|
33
|
+
{
|
34
|
+
color: 'var(--lic-color-text-muted)'
|
35
|
+
}
|
36
|
+
],
|
37
|
+
[
|
38
|
+
'linkIsActive',
|
39
|
+
{
|
40
|
+
'text-decoration': 'underline',
|
41
|
+
'text-decoration-style': 'double',
|
42
|
+
'text-decoration-color': 'var(--lic-color-primary-highlight)'
|
43
|
+
}
|
44
|
+
]
|
45
|
+
]
|
46
|
+
|
47
|
+
const btn: Rule[] = [
|
48
|
+
[
|
49
|
+
'btnPrimary',
|
50
|
+
{
|
51
|
+
/* 按钮的默认背景色为主题色 */
|
52
|
+
'background-color': 'var(--lic-color-primary)',
|
53
|
+
/* 文字颜色为白色,以保证在主题色背景上的可读性 */
|
54
|
+
color: 'white',
|
55
|
+
/* 去除默认边框 */
|
56
|
+
border: 'none',
|
57
|
+
/* 设置内边距,使按钮内容有合适的空间 */
|
58
|
+
padding: '10px 20px',
|
59
|
+
/* 设置按钮的圆角半径,使其外观更圆润 */
|
60
|
+
'border-radius': '5px',
|
61
|
+
/* 设置过渡效果,当按钮状态改变时(如悬停),背景色的变化会有平滑过渡 */
|
62
|
+
transition: 'background-color 0.3s ease',
|
63
|
+
/* 设置鼠标指针样式为手型,表示可点击 */
|
64
|
+
cursor: 'pointer'
|
65
|
+
}
|
66
|
+
],
|
67
|
+
[
|
68
|
+
'btnHover',
|
69
|
+
{
|
70
|
+
/* 当鼠标悬停在按钮上时,背景色变为主题色的悬停色调 */
|
71
|
+
'background-color': 'var(--lic-color-primary-hover)'
|
72
|
+
}
|
73
|
+
],
|
74
|
+
[
|
75
|
+
'btnActive',
|
76
|
+
{
|
77
|
+
/* 当按钮被按下时,背景色变为主题色的高亮色调 */
|
78
|
+
'background-color': 'var(--lic-color-primary-highlight)'
|
79
|
+
}
|
80
|
+
],
|
81
|
+
[
|
82
|
+
'btnDisabled',
|
83
|
+
{
|
84
|
+
/* 当按钮处于禁用状态时 */
|
85
|
+
/* 背景色变为较浅的、用于表示禁用的色调 */
|
86
|
+
'background-color': 'var(--lic-color-background-muted)',
|
87
|
+
/* 文字颜色变为表示禁用的文本颜色 */
|
88
|
+
color: 'var(--lic-color-text-disabled)',
|
89
|
+
/* 鼠标指针变为不可用样式 */
|
90
|
+
cursor: 'not-allowed'
|
91
|
+
}
|
92
|
+
]
|
93
|
+
]
|
94
|
+
|
95
|
+
const success: Rule[] = [
|
96
|
+
[
|
97
|
+
'success',
|
98
|
+
{
|
99
|
+
'background-color': 'var(--lic-color-success)',
|
100
|
+
color: 'var(--lic-color-text-inverse) !important'
|
101
|
+
}
|
102
|
+
],
|
103
|
+
[
|
104
|
+
'successHover',
|
105
|
+
{
|
106
|
+
'background-color': 'var(--lic-color-success-hover)'
|
107
|
+
}
|
108
|
+
]
|
109
|
+
]
|
110
|
+
|
111
|
+
const active: Rule[] = [
|
112
|
+
[
|
113
|
+
'active',
|
114
|
+
{
|
115
|
+
'background-color': 'var(--lic-color-primary-highlight)'
|
116
|
+
}
|
117
|
+
]
|
118
|
+
]
|
119
|
+
|
120
|
+
const rules: Record<string, Rule[]> = {
|
121
|
+
link,
|
122
|
+
btn,
|
123
|
+
success,
|
124
|
+
active
|
125
|
+
}
|
126
|
+
|
127
|
+
export default rules
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import js from '@eslint/js'
|
2
|
+
import globals from 'globals'
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
5
|
+
import tseslint from 'typescript-eslint'
|
6
|
+
import prettier from 'eslint-plugin-prettier'
|
7
|
+
import prettierConfig from './prettier.config.mjs'
|
8
|
+
|
9
|
+
export default tseslint.config(
|
10
|
+
{ ignores: ['dist', 'node_modules'] },
|
11
|
+
{
|
12
|
+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
13
|
+
files: ['**/*.{ts,tsx}'],
|
14
|
+
languageOptions: {
|
15
|
+
ecmaVersion: 2020,
|
16
|
+
globals: globals.browser
|
17
|
+
},
|
18
|
+
plugins: {
|
19
|
+
prettier,
|
20
|
+
'react-hooks': reactHooks,
|
21
|
+
'react-refresh': reactRefresh
|
22
|
+
},
|
23
|
+
rules: {
|
24
|
+
'prettier/prettier': ['error', prettierConfig],
|
25
|
+
'no-useless-escape': 'error',
|
26
|
+
'no-undef': 'error',
|
27
|
+
'no-unused-vars': 'error',
|
28
|
+
'@typescript-eslint/consistent-type-imports': 'error', // 要求 import type
|
29
|
+
'@typescript-eslint/no-use-before-define': 'error',
|
30
|
+
'@typescript-eslint/ban-ts-comment': 'error',
|
31
|
+
'@typescript-eslint/no-non-null-assertion': 'error',
|
32
|
+
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
33
|
+
'@typescript-eslint/no-unused-vars': 'error',
|
34
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
35
|
+
'@typescript-eslint/no-var-requires': 'error',
|
36
|
+
'@typescript-eslint/no-empty-function': 'error',
|
37
|
+
...reactHooks.configs.recommended.rules,
|
38
|
+
'react-refresh/only-export-components': [
|
39
|
+
'warn',
|
40
|
+
{ allowConstantExport: true }
|
41
|
+
]
|
42
|
+
}
|
43
|
+
}
|
44
|
+
)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/lic.svg" />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
7
|
+
<title>Lic-Vite-React</title>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<div id="root"></div>
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
12
|
+
</body>
|
13
|
+
</html>
|