Commit
•
d38ac2f
1
Parent(s):
0146ab9
➕ Add icon libs
Browse files- package.json +4 -0
- pnpm-lock.yaml +20 -0
- vite.config.ts +36 -25
package.json
CHANGED
@@ -12,10 +12,14 @@
|
|
12 |
"format": "prettier --plugin-search-dir . --write ."
|
13 |
},
|
14 |
"devDependencies": {
|
|
|
|
|
15 |
"@sveltejs/adapter-node": "next",
|
16 |
"@sveltejs/kit": "next",
|
17 |
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
18 |
"@typescript-eslint/parser": "^5.27.0",
|
|
|
|
|
19 |
"@unocss/reset": "^0.46.3",
|
20 |
"eslint": "^8.16.0",
|
21 |
"eslint-config-prettier": "^8.3.0",
|
|
|
12 |
"format": "prettier --plugin-search-dir . --write ."
|
13 |
},
|
14 |
"devDependencies": {
|
15 |
+
"@iconify-json/ant-design": "^1.1.3",
|
16 |
+
"@iconify-json/il": "^1.1.2",
|
17 |
"@sveltejs/adapter-node": "next",
|
18 |
"@sveltejs/kit": "next",
|
19 |
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
20 |
"@typescript-eslint/parser": "^5.27.0",
|
21 |
+
"@unocss/preset-icons": "^0.46.3",
|
22 |
+
"@unocss/preset-uno": "^0.46.3",
|
23 |
"@unocss/reset": "^0.46.3",
|
24 |
"eslint": "^8.16.0",
|
25 |
"eslint-config-prettier": "^8.3.0",
|
pnpm-lock.yaml
CHANGED
@@ -1,10 +1,14 @@
|
|
1 |
lockfileVersion: 5.4
|
2 |
|
3 |
specifiers:
|
|
|
|
|
4 |
'@sveltejs/adapter-node': next
|
5 |
'@sveltejs/kit': next
|
6 |
'@typescript-eslint/eslint-plugin': ^5.27.0
|
7 |
'@typescript-eslint/parser': ^5.27.0
|
|
|
|
|
8 |
'@unocss/reset': ^0.46.3
|
9 |
eslint: ^8.16.0
|
10 |
eslint-config-prettier: ^8.3.0
|
@@ -20,10 +24,14 @@ specifiers:
|
|
20 |
vite: ^3.1.0
|
21 |
|
22 |
devDependencies:
|
|
|
|
|
23 |
'@sveltejs/adapter-node': 1.0.0-next.100
|
24 |
'@sveltejs/kit': [email protected][email protected]
|
25 |
'@typescript-eslint/eslint-plugin': 5.42.0_6xw5wg2354iw4zujk2f3vyfrzu
|
26 |
'@typescript-eslint/parser': 5.42.0_wyqvi574yv7oiwfeinomdzmc3m
|
|
|
|
|
27 |
'@unocss/reset': 0.46.3
|
28 |
eslint: 8.26.0
|
29 |
eslint-config-prettier: [email protected]
|
@@ -114,6 +122,18 @@ packages:
|
|
114 |
resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==}
|
115 |
dev: true
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
/@iconify/types/2.0.0:
|
118 |
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
|
119 |
dev: true
|
|
|
1 |
lockfileVersion: 5.4
|
2 |
|
3 |
specifiers:
|
4 |
+
'@iconify-json/ant-design': ^1.1.3
|
5 |
+
'@iconify-json/il': ^1.1.2
|
6 |
'@sveltejs/adapter-node': next
|
7 |
'@sveltejs/kit': next
|
8 |
'@typescript-eslint/eslint-plugin': ^5.27.0
|
9 |
'@typescript-eslint/parser': ^5.27.0
|
10 |
+
'@unocss/preset-icons': ^0.46.3
|
11 |
+
'@unocss/preset-uno': ^0.46.3
|
12 |
'@unocss/reset': ^0.46.3
|
13 |
eslint: ^8.16.0
|
14 |
eslint-config-prettier: ^8.3.0
|
|
|
24 |
vite: ^3.1.0
|
25 |
|
26 |
devDependencies:
|
27 |
+
'@iconify-json/ant-design': 1.1.3
|
28 |
+
'@iconify-json/il': 1.1.2
|
29 |
'@sveltejs/adapter-node': 1.0.0-next.100
|
30 |
'@sveltejs/kit': [email protected][email protected]
|
31 |
'@typescript-eslint/eslint-plugin': 5.42.0_6xw5wg2354iw4zujk2f3vyfrzu
|
32 |
'@typescript-eslint/parser': 5.42.0_wyqvi574yv7oiwfeinomdzmc3m
|
33 |
+
'@unocss/preset-icons': 0.46.3
|
34 |
+
'@unocss/preset-uno': 0.46.3
|
35 |
'@unocss/reset': 0.46.3
|
36 |
eslint: 8.26.0
|
37 |
eslint-config-prettier: [email protected]
|
|
|
122 |
resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==}
|
123 |
dev: true
|
124 |
|
125 |
+
/@iconify-json/ant-design/1.1.3:
|
126 |
+
resolution: {integrity: sha512-PL5NpjkjFxmOY6CGdgd1XAVTQZrkBC/XilXJsqeiAmL8fFlIri/GCdqt2f0OrP4RQFUoCGxaKmSXqbj/T9HUXw==}
|
127 |
+
dependencies:
|
128 |
+
'@iconify/types': 2.0.0
|
129 |
+
dev: true
|
130 |
+
|
131 |
+
/@iconify-json/il/1.1.2:
|
132 |
+
resolution: {integrity: sha512-WIV6Mxsy6hIOERu+Nol9gy35b2sVftLJdVlgYMbfMgszgdIYhC4orlRTLxOy7SEuoAieC1KUfsFaHd8v6NPiQw==}
|
133 |
+
dependencies:
|
134 |
+
'@iconify/types': 2.0.0
|
135 |
+
dev: true
|
136 |
+
|
137 |
/@iconify/types/2.0.0:
|
138 |
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
|
139 |
dev: true
|
vite.config.ts
CHANGED
@@ -1,33 +1,44 @@
|
|
1 |
import { sveltekit } from '@sveltejs/kit/vite';
|
2 |
import type { UserConfig } from 'vite';
|
3 |
-
import Unocss from 'unocss/vite'
|
|
|
|
|
4 |
|
5 |
const config: UserConfig = {
|
6 |
-
plugins: [
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
28 |
},
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
};
|
32 |
|
33 |
export default config;
|
|
|
1 |
import { sveltekit } from '@sveltejs/kit/vite';
|
2 |
import type { UserConfig } from 'vite';
|
3 |
+
import Unocss from 'unocss/vite';
|
4 |
+
import presetIcons from '@unocss/preset-icons';
|
5 |
+
import presetUno from '@unocss/preset-uno';
|
6 |
|
7 |
const config: UserConfig = {
|
8 |
+
plugins: [
|
9 |
+
sveltekit(),
|
10 |
+
Unocss({
|
11 |
+
presets: [presetUno(), presetIcons()],
|
12 |
+
rules: [
|
13 |
+
[
|
14 |
+
/^text-(.*)$/,
|
15 |
+
([, c], { theme }) => {
|
16 |
+
if (c in theme.colors) return { color: theme.colors[c as keyof typeof theme.colors] };
|
17 |
+
}
|
18 |
+
],
|
19 |
+
[
|
20 |
+
/^bg-(.*)$/,
|
21 |
+
([, c], { theme }) => {
|
22 |
+
if (c in theme.colors)
|
23 |
+
return { 'background-color': theme.colors[c as keyof typeof theme.colors] };
|
24 |
+
}
|
25 |
+
]
|
26 |
+
],
|
27 |
+
shortcuts: {
|
28 |
+
input: 'w-full max-w-80 text-lg pl-2 border border-solid border-2 rounded-xl',
|
29 |
+
link: 'underline text-brunswick',
|
30 |
+
btn: 'text-white bg-oxford px-4 py-2 rounded-3xl font-bold border-0',
|
31 |
+
'btn-sunray': 'text-white bg-sunray px-4 py-2 rounded-3xl font-bold border-0'
|
32 |
},
|
33 |
+
theme: {
|
34 |
+
colors: {
|
35 |
+
oxford: '#0a274c',
|
36 |
+
sunray: '#d3a95a',
|
37 |
+
brunswick: '#1e4832'
|
38 |
+
}
|
39 |
+
}
|
40 |
+
})
|
41 |
+
]
|
42 |
};
|
43 |
|
44 |
export default config;
|