From 2338b5c720e017fd96e59dda54d9dde869c0122a Mon Sep 17 00:00:00 2001 From: yuyinws Date: Sat, 7 Sep 2024 17:30:38 +0800 Subject: [PATCH 1/2] docs: add group icon plugin --- docs/.vitepress/config/index.ts | 9 +++++++ docs/.vitepress/theme/index.ts | 1 + package.json | 1 + pnpm-lock.yaml | 48 +++++++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+) diff --git a/docs/.vitepress/config/index.ts b/docs/.vitepress/config/index.ts index 01105b4..61e6ab9 100644 --- a/docs/.vitepress/config/index.ts +++ b/docs/.vitepress/config/index.ts @@ -2,6 +2,7 @@ import { defineConfig } from 'vitepress' import { transformerTwoslash } from '@shikijs/vitepress-twoslash' import { algolia } from './algolia' import { en } from './en' +import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons' export default defineConfig({ title: 'Pinia Plugin Persistedstate', @@ -31,6 +32,14 @@ export default defineConfig({ dark: 'catppuccin-mocha', light: 'catppuccin-latte', }, + config(md) { + md.use(groupIconMdPlugin) + }, + }, + vite: { + plugins: [ + groupIconVitePlugin() + ], }, themeConfig: { logo: { diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index 6b9dbf4..bea02eb 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -5,6 +5,7 @@ import DefaultTheme from 'vitepress/theme' import TwoslashClient from '@shikijs/vitepress-twoslash/client' import '@shikijs/vitepress-twoslash/style.css' import './style.css' +import 'virtual:group-icons.css' export default { extends: DefaultTheme, diff --git a/package.json b/package.json index 025f0a7..8225887 100644 --- a/package.json +++ b/package.json @@ -108,6 +108,7 @@ "tsup": "^8.2.4", "typescript": "^5.5.4", "vitepress": "^1.3.4", + "vitepress-plugin-group-icons": "^1.1.0", "vitest": "^2.0.5", "vue": "^3.4.38", "vue-tsc": "^2.1.4" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8b5d3c8..8c9ef97 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -81,6 +81,9 @@ importers: vitepress: specifier: ^1.3.4 version: 1.3.4(@algolia/client-search@4.24.0)(@types/node@22.5.2)(postcss@8.4.41)(search-insights@2.17.0)(terser@5.31.6)(typescript@5.5.4) + vitepress-plugin-group-icons: + specifier: ^1.1.0 + version: 1.1.0 vitest: specifier: ^2.0.5 version: 2.0.5(@types/node@22.5.2)(terser@5.31.6) @@ -1020,6 +1023,18 @@ packages: resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} engines: {node: '>=18.18'} + '@iconify-json/logos@1.2.0': + resolution: {integrity: sha512-VkU9QSqeZR2guWbecdqkcoZEAJfgJJTUm6QAsypuZQ7Cve6zy39wOXDjp2H31I8QyQy4O3Cz96+pNji6UQFg4w==} + + '@iconify-json/vscode-icons@1.2.0': + resolution: {integrity: sha512-DjsfialtmFQrJb4pi0P8Vm5+FVmXg8NExThMLwHOGjvMJi9Q89Qw36RpZxw2wEzPFkb19fMje+G0jeSeWol7ZA==} + + '@iconify/types@2.0.0': + resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} + + '@iconify/utils@2.1.32': + resolution: {integrity: sha512-LeifFZPPKu28O3AEDpYJNdEbvS4/ojAPyIW+pF/vUpJTYnbTiXUHkCh0bwgFRzKvdpb8H4Fbfd/742++MF4fPQ==} + '@ioredis/commands@1.2.0': resolution: {integrity: sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==} @@ -5032,6 +5047,9 @@ packages: terser: optional: true + vitepress-plugin-group-icons@1.1.0: + resolution: {integrity: sha512-hKf/imrMxa63kAXJlztsb8l6DZYBNZiVSZpJ15rNTeqAL1Hhbuf/DC87Q2r4b/mGKHUusEOI5ogt/jrJ8JoeUw==} + vitepress@1.3.4: resolution: {integrity: sha512-I1/F6OW1xl3kW4PaIMC6snxjWgf3qfziq2aqsDoFc/Gt41WbcRv++z8zjw8qGRIJ+I4bUW7ZcKFDHHN/jkH9DQ==} hasBin: true @@ -6017,6 +6035,28 @@ snapshots: '@humanwhocodes/retry@0.3.0': {} + '@iconify-json/logos@1.2.0': + dependencies: + '@iconify/types': 2.0.0 + + '@iconify-json/vscode-icons@1.2.0': + dependencies: + '@iconify/types': 2.0.0 + + '@iconify/types@2.0.0': {} + + '@iconify/utils@2.1.32': + dependencies: + '@antfu/install-pkg': 0.4.1 + '@antfu/utils': 0.7.10 + '@iconify/types': 2.0.0 + debug: 4.3.6 + kolorist: 1.8.0 + local-pkg: 0.5.0 + mlly: 1.7.1 + transitivePeerDependencies: + - supports-color + '@ioredis/commands@1.2.0': {} '@isaacs/cliui@8.0.2': @@ -10841,6 +10881,14 @@ snapshots: fsevents: 2.3.3 terser: 5.31.6 + vitepress-plugin-group-icons@1.1.0: + dependencies: + '@iconify-json/logos': 1.2.0 + '@iconify-json/vscode-icons': 1.2.0 + '@iconify/utils': 2.1.32 + transitivePeerDependencies: + - supports-color + vitepress@1.3.4(@algolia/client-search@4.24.0)(@types/node@22.5.2)(postcss@8.4.41)(search-insights@2.17.0)(terser@5.31.6)(typescript@5.5.4): dependencies: '@docsearch/css': 3.6.1 From f58363f8aacff719d7b4181b5b2b7e2b82d62afc Mon Sep 17 00:00:00 2001 From: yuyinws Date: Tue, 10 Sep 2024 14:37:57 +0800 Subject: [PATCH 2/2] chore: fix lint error --- docs/.vitepress/config/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/.vitepress/config/index.ts b/docs/.vitepress/config/index.ts index 61e6ab9..d4cf6db 100644 --- a/docs/.vitepress/config/index.ts +++ b/docs/.vitepress/config/index.ts @@ -1,8 +1,8 @@ import { defineConfig } from 'vitepress' import { transformerTwoslash } from '@shikijs/vitepress-twoslash' +import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons' import { algolia } from './algolia' import { en } from './en' -import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons' export default defineConfig({ title: 'Pinia Plugin Persistedstate', @@ -38,7 +38,7 @@ export default defineConfig({ }, vite: { plugins: [ - groupIconVitePlugin() + groupIconVitePlugin(), ], }, themeConfig: {