@unocss/nuxt 0.20.1 → 0.21.1
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/dist/index.d.ts +7 -0
- package/dist/index.mjs +11 -7
- package/package.json +9 -8
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { PresetUnoOptions } from '@unocss/preset-uno';
|
|
|
3
3
|
import { AttributifyOptions } from '@unocss/preset-attributify';
|
|
4
4
|
import { IconsOptions } from '@unocss/preset-icons';
|
|
5
5
|
import { UserConfig } from '@unocss/core';
|
|
6
|
+
import { WebFontsOptions } from '@unocss/preset-web-fonts';
|
|
6
7
|
|
|
7
8
|
interface UnocssNuxtOptions extends UserConfig {
|
|
8
9
|
/**
|
|
@@ -42,6 +43,12 @@ interface UnocssNuxtOptions extends UserConfig {
|
|
|
42
43
|
* @default false
|
|
43
44
|
*/
|
|
44
45
|
icons?: boolean | IconsOptions;
|
|
46
|
+
/**
|
|
47
|
+
* Enable web fonts preset and the options of it
|
|
48
|
+
* Only works when `presets` is not specified
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
webFonts?: boolean | WebFontsOptions;
|
|
45
52
|
}
|
|
46
53
|
declare const _default: _nuxt_schema.NuxtModule<UnocssNuxtOptions>;
|
|
47
54
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { dirname, resolve } from 'path';
|
|
2
2
|
import { fileURLToPath } from 'url';
|
|
3
3
|
import { defineNuxtModule, addPluginTemplate, addComponentsDir, extendViteConfig, extendWebpackConfig } from '@nuxt/kit';
|
|
4
|
-
import { presetUno } from '@unocss/preset-uno';
|
|
5
|
-
import presetAttributify from '@unocss/preset-attributify';
|
|
6
|
-
import presetIcons from '@unocss/preset-icons';
|
|
7
4
|
import WebpackPlugin from '@unocss/webpack';
|
|
8
5
|
import VitePlugin from '@unocss/vite';
|
|
6
|
+
import presetUno from '@unocss/preset-uno';
|
|
7
|
+
import presetAttributify from '@unocss/preset-attributify';
|
|
8
|
+
import presetIcons from '@unocss/preset-icons';
|
|
9
|
+
import presetWebFonts from '@unocss/preset-web-fonts';
|
|
9
10
|
|
|
10
11
|
const dir = dirname(fileURLToPath(import.meta.url));
|
|
11
12
|
const index = defineNuxtModule({
|
|
@@ -14,12 +15,13 @@ const index = defineNuxtModule({
|
|
|
14
15
|
configKey: "unocss"
|
|
15
16
|
},
|
|
16
17
|
defaults: {
|
|
17
|
-
|
|
18
|
-
attributify: false,
|
|
18
|
+
autoImport: true,
|
|
19
19
|
preflight: false,
|
|
20
|
-
icons: false,
|
|
21
20
|
components: true,
|
|
22
|
-
|
|
21
|
+
uno: true,
|
|
22
|
+
attributify: false,
|
|
23
|
+
webFonts: false,
|
|
24
|
+
icons: false
|
|
23
25
|
},
|
|
24
26
|
setup(options) {
|
|
25
27
|
if (options.presets == null) {
|
|
@@ -30,6 +32,8 @@ const index = defineNuxtModule({
|
|
|
30
32
|
options.presets.push(presetAttributify(typeof options.attributify === "boolean" ? {} : options.attributify));
|
|
31
33
|
if (options.icons)
|
|
32
34
|
options.presets.push(presetIcons(typeof options.icons === "boolean" ? {} : options.icons));
|
|
35
|
+
if (options.webFonts)
|
|
36
|
+
options.presets.push(presetWebFonts(typeof options.webFonts === "boolean" ? {} : options.webFonts));
|
|
33
37
|
}
|
|
34
38
|
if (options.autoImport) {
|
|
35
39
|
addPluginTemplate({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"description": "Nuxt module for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -37,13 +37,14 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@nuxt/kit": "npm:@nuxt/kit-edge@latest",
|
|
40
|
-
"@unocss/core": "0.
|
|
41
|
-
"@unocss/preset-attributify": "0.
|
|
42
|
-
"@unocss/preset-icons": "0.
|
|
43
|
-
"@unocss/preset-uno": "0.
|
|
44
|
-
"@unocss/
|
|
45
|
-
"@unocss/
|
|
46
|
-
"@unocss/
|
|
40
|
+
"@unocss/core": "0.21.1",
|
|
41
|
+
"@unocss/preset-attributify": "0.21.1",
|
|
42
|
+
"@unocss/preset-icons": "0.21.1",
|
|
43
|
+
"@unocss/preset-uno": "0.21.1",
|
|
44
|
+
"@unocss/preset-web-fonts": "0.21.1",
|
|
45
|
+
"@unocss/reset": "0.21.1",
|
|
46
|
+
"@unocss/vite": "0.21.1",
|
|
47
|
+
"@unocss/webpack": "0.21.1"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@nuxt/schema": "npm:@nuxt/schema-edge@latest"
|