unocss 0.15.6 → 0.16.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 +55 -0
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -109,6 +109,61 @@ export default {
|
|
|
109
109
|
|
|
110
110
|
Refer to the full documentation on https://github.com/antfu/unocss/tree/main/packages/nuxt
|
|
111
111
|
|
|
112
|
+
### Vite + Svelte
|
|
113
|
+
|
|
114
|
+
You must add `Unocss` plugin before `@sveltejs/vite-plugin-svelte`.
|
|
115
|
+
|
|
116
|
+
To support `class:foo` and `class:foo={bar}` add `Unocss` and configure `svelteExtractor`:
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
// vite.config.js
|
|
120
|
+
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
|
121
|
+
import Unocss from 'unocss/vite'
|
|
122
|
+
import { svelteExtractor } from '@unocss/core'
|
|
123
|
+
|
|
124
|
+
export default {
|
|
125
|
+
plugins: [
|
|
126
|
+
Unocss({
|
|
127
|
+
extractors: [svelteExtractor],
|
|
128
|
+
/* options */
|
|
129
|
+
}),
|
|
130
|
+
svelte()
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Sveltekit
|
|
136
|
+
|
|
137
|
+
To support `class:foo` and `class:foo={bar}` add `Unocss` plugin and configure `svelteExtractor`:
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
// svelte.config.js
|
|
141
|
+
import preprocess from 'svelte-preprocess'
|
|
142
|
+
import UnoCss from 'unocss/vite'
|
|
143
|
+
import { svelteExtractor } from '@unocss/core'
|
|
144
|
+
|
|
145
|
+
/** @type {import('@sveltejs/kit').Config} */
|
|
146
|
+
const config = {
|
|
147
|
+
// Consult https://github.com/sveltejs/svelte-preprocess
|
|
148
|
+
// for more information about preprocessors
|
|
149
|
+
preprocess: preprocess(),
|
|
150
|
+
|
|
151
|
+
kit: {
|
|
152
|
+
|
|
153
|
+
// hydrate the <div id="svelte"> element in src/app.html
|
|
154
|
+
target: '#svelte',
|
|
155
|
+
vite: {
|
|
156
|
+
plugins: [
|
|
157
|
+
UnoCss({
|
|
158
|
+
extractors: [svelteExtractor],
|
|
159
|
+
/* options */
|
|
160
|
+
})
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
112
167
|
## Configurations
|
|
113
168
|
|
|
114
169
|
UnoCSS is an atomic-CSS engine instead of a framework. Everything is designed with flexibility and performance in mind. In UnoCSS, there are no core utilities; all functionalities are provided via presets.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unocss",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "The instant on-demand Atomic CSS engine.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"*.d.ts"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@unocss/core": "0.
|
|
46
|
-
"@unocss/cli": "0.
|
|
47
|
-
"@unocss/reset": "0.
|
|
48
|
-
"@unocss/preset-icons": "0.
|
|
49
|
-
"@unocss/preset-attributify": "0.
|
|
50
|
-
"@unocss/preset-uno": "0.
|
|
51
|
-
"@unocss/vite": "0.
|
|
45
|
+
"@unocss/core": "0.16.0",
|
|
46
|
+
"@unocss/cli": "0.16.0",
|
|
47
|
+
"@unocss/reset": "0.16.0",
|
|
48
|
+
"@unocss/preset-icons": "0.16.0",
|
|
49
|
+
"@unocss/preset-attributify": "0.16.0",
|
|
50
|
+
"@unocss/preset-uno": "0.16.0",
|
|
51
|
+
"@unocss/vite": "0.16.0"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=14"
|