chore: tweak
This commit is contained in:
parent
bf65d79c50
commit
306f8ea03e
@ -1,6 +1,7 @@
|
|||||||
import * as path from 'node:path'
|
import * as path from 'node:path'
|
||||||
import { type UserConfig, defineUserConfig } from 'vuepress'
|
import { type UserConfig, defineUserConfig } from 'vuepress'
|
||||||
import { viteBundler } from '@vuepress/bundler-vite'
|
import { viteBundler } from '@vuepress/bundler-vite'
|
||||||
|
import { addViteOptimizeDepsInclude, addViteSsrExternal } from '@vuepress/helper'
|
||||||
import { theme } from './theme.js'
|
import { theme } from './theme.js'
|
||||||
|
|
||||||
export default defineUserConfig({
|
export default defineUserConfig({
|
||||||
@ -21,6 +22,11 @@ export default defineUserConfig({
|
|||||||
|
|
||||||
pagePatterns: ['**/*.md', '!**/*.snippet.md', '!.vuepress', '!node_modules'],
|
pagePatterns: ['**/*.md', '!**/*.snippet.md', '!.vuepress', '!node_modules'],
|
||||||
|
|
||||||
|
extendsBundlerOptions(bundlerOptions, app) {
|
||||||
|
addViteOptimizeDepsInclude(bundlerOptions, app, '@simonwep/pickr')
|
||||||
|
addViteSsrExternal(bundlerOptions, app, '@simonwep/pickr')
|
||||||
|
},
|
||||||
|
|
||||||
bundler: viteBundler(),
|
bundler: viteBundler(),
|
||||||
|
|
||||||
theme,
|
theme,
|
||||||
|
|||||||
@ -1,23 +1,20 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import 'https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/pickr.es5.min.js'
|
import '@simonwep/pickr/dist/themes/nano.min.css'
|
||||||
import { onMounted, onUnmounted, ref, watch } from 'vue'
|
import { onMounted, onUnmounted, ref, watch } from 'vue'
|
||||||
|
|
||||||
const emit = defineEmits<{ (e: 'update:modelValue', value: string): void }>()
|
const emit = defineEmits<{ (e: 'update:modelValue', value: string): void }>()
|
||||||
|
|
||||||
// eslint-disable-next-line ts/no-namespace
|
|
||||||
declare namespace window {
|
|
||||||
const Pickr: any
|
|
||||||
}
|
|
||||||
|
|
||||||
const color = defineModel<string>('modelValue', { default: 'rgba(0,0,0,1)' })
|
const color = defineModel<string>('modelValue', { default: 'rgba(0,0,0,1)' })
|
||||||
const pickerEl = ref<HTMLDivElement>()
|
const pickerEl = ref<HTMLDivElement>()
|
||||||
let picker: any
|
let picker: any
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
if (!pickerEl.value || picker)
|
if (!pickerEl.value || picker)
|
||||||
return
|
return
|
||||||
|
|
||||||
picker = window.Pickr.create({
|
const { default: Pickr } = await import('@simonwep/pickr')
|
||||||
|
|
||||||
|
picker = Pickr.create({
|
||||||
el: pickerEl.value,
|
el: pickerEl.value,
|
||||||
theme: 'nano',
|
theme: 'nano',
|
||||||
default: color.value,
|
default: color.value,
|
||||||
|
|||||||
@ -8,11 +8,6 @@ readingTime: false
|
|||||||
editLink: false
|
editLink: false
|
||||||
contributors: false
|
contributors: false
|
||||||
lastUpdated: false
|
lastUpdated: false
|
||||||
head:
|
|
||||||
-
|
|
||||||
- link
|
|
||||||
- href: https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/nano.min.css
|
|
||||||
rel: stylesheet
|
|
||||||
---
|
---
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
|
|||||||
@ -12,14 +12,15 @@
|
|||||||
"vuepress": "2.0.0-rc.14"
|
"vuepress": "2.0.0-rc.14"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iconify/json": "^2.2.231",
|
"@iconify/json": "^2.2.234",
|
||||||
|
"@simonwep/pickr": "^1.9.1",
|
||||||
"@vuepress/bundler-vite": "2.0.0-rc.14",
|
"@vuepress/bundler-vite": "2.0.0-rc.14",
|
||||||
"chart.js": "^4.4.3",
|
"chart.js": "^4.4.3",
|
||||||
"echarts": "^5.5.1",
|
"echarts": "^5.5.1",
|
||||||
"flowchart.ts": "^3.0.0",
|
"flowchart.ts": "^3.0.0",
|
||||||
"http-server": "^14.1.1",
|
"http-server": "^14.1.1",
|
||||||
"mermaid": "^10.9.1",
|
"mermaid": "^10.9.1",
|
||||||
"vue": "^3.4.34",
|
"vue": "^3.4.35",
|
||||||
"vuepress-theme-plume": "workspace:*"
|
"vuepress-theme-plume": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
10
package.json
10
package.json
@ -44,18 +44,18 @@
|
|||||||
"@types/lodash.merge": "^4.6.9",
|
"@types/lodash.merge": "^4.6.9",
|
||||||
"@types/node": "20.12.10",
|
"@types/node": "20.12.10",
|
||||||
"@types/webpack-env": "^1.18.5",
|
"@types/webpack-env": "^1.18.5",
|
||||||
"bumpp": "^9.4.1",
|
"bumpp": "^9.4.2",
|
||||||
"commitizen": "^4.3.0",
|
"commitizen": "^4.3.0",
|
||||||
"conventional-changelog-cli": "^5.0.0",
|
"conventional-changelog-cli": "^5.0.0",
|
||||||
"cpx2": "^7.0.1",
|
"cpx2": "^7.0.1",
|
||||||
"cz-conventional-changelog": "^3.3.0",
|
"cz-conventional-changelog": "^3.3.0",
|
||||||
"eslint": "^9.8.0",
|
"eslint": "^9.8.0",
|
||||||
"husky": "^9.1.3",
|
"husky": "^9.1.4",
|
||||||
"lint-staged": "^15.2.7",
|
"lint-staged": "^15.2.8",
|
||||||
"rimraf": "^6.0.1",
|
"rimraf": "^6.0.1",
|
||||||
"stylelint": "^16.7.0",
|
"stylelint": "^16.8.1",
|
||||||
"tsconfig-vuepress": "^4.5.0",
|
"tsconfig-vuepress": "^4.5.0",
|
||||||
"tsup": "^8.2.3",
|
"tsup": "^8.2.4",
|
||||||
"typescript": "^5.5.4",
|
"typescript": "^5.5.4",
|
||||||
"wait-on": "^7.2.0"
|
"wait-on": "^7.2.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
"vuepress": "2.0.0-rc.14"
|
"vuepress": "2.0.0-rc.14"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@ -46,19 +46,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iconify/utils": "^2.1.25",
|
"@iconify/utils": "^2.1.30",
|
||||||
"@vuepress/helper": "2.0.0-rc.40",
|
"@vuepress/helper": "2.0.0-rc.40",
|
||||||
"@vueuse/core": "^10.11.0",
|
"@vueuse/core": "^10.11.0",
|
||||||
"local-pkg": "^0.5.0",
|
"local-pkg": "^0.5.0",
|
||||||
"markdown-it-container": "^4.0.0",
|
"markdown-it-container": "^4.0.0",
|
||||||
"nanoid": "^5.0.7",
|
"nanoid": "^5.0.7",
|
||||||
"shiki": "^1.12.0",
|
"shiki": "^1.12.1",
|
||||||
"tm-grammars": "^1.15.1",
|
"tm-grammars": "^1.16.2",
|
||||||
"tm-themes": "^1.5.7",
|
"tm-themes": "^1.6.1",
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@iconify/json": "^2.2.231",
|
"@iconify/json": "^2.2.234",
|
||||||
"@types/markdown-it": "^14.1.2"
|
"@types/markdown-it": "^14.1.2"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
"mark.js": "^8.11.1",
|
"mark.js": "^8.11.1",
|
||||||
"minisearch": "^7.1.0",
|
"minisearch": "^7.1.0",
|
||||||
"p-map": "^7.0.2",
|
"p-map": "^7.0.2",
|
||||||
"vue": "^3.4.34"
|
"vue": "^3.4.35"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@ -36,8 +36,8 @@
|
|||||||
"vuepress": "2.0.0-rc.14"
|
"vuepress": "2.0.0-rc.14"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@shikijs/transformers": "^1.12.0",
|
"@shikijs/transformers": "^1.12.1",
|
||||||
"@shikijs/twoslash": "^1.12.0",
|
"@shikijs/twoslash": "^1.12.1",
|
||||||
"@types/hast": "^3.0.4",
|
"@types/hast": "^3.0.4",
|
||||||
"@vuepress/helper": "2.0.0-rc.40",
|
"@vuepress/helper": "2.0.0-rc.40",
|
||||||
"@vueuse/core": "^10.11.0",
|
"@vueuse/core": "^10.11.0",
|
||||||
@ -46,7 +46,7 @@
|
|||||||
"mdast-util-gfm": "^3.0.0",
|
"mdast-util-gfm": "^3.0.0",
|
||||||
"mdast-util-to-hast": "^13.2.0",
|
"mdast-util-to-hast": "^13.2.0",
|
||||||
"nanoid": "^5.0.7",
|
"nanoid": "^5.0.7",
|
||||||
"shiki": "^1.12.0",
|
"shiki": "^1.12.1",
|
||||||
"twoslash": "^0.2.9",
|
"twoslash": "^0.2.9",
|
||||||
"twoslash-vue": "^0.2.9"
|
"twoslash-vue": "^0.2.9"
|
||||||
},
|
},
|
||||||
|
|||||||
966
pnpm-lock.yaml
generated
966
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -71,7 +71,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iconify/utils": "^2.1.25",
|
"@iconify/utils": "^2.1.30",
|
||||||
"@iconify/vue": "^4.1.2",
|
"@iconify/vue": "^4.1.2",
|
||||||
"@pengzhanbo/utils": "^1.1.2",
|
"@pengzhanbo/utils": "^1.1.2",
|
||||||
"@vuepress-plume/plugin-content-update": "workspace:*",
|
"@vuepress-plume/plugin-content-update": "workspace:*",
|
||||||
@ -103,12 +103,12 @@
|
|||||||
"katex": "^0.16.11",
|
"katex": "^0.16.11",
|
||||||
"local-pkg": "^0.5.0",
|
"local-pkg": "^0.5.0",
|
||||||
"nanoid": "^5.0.7",
|
"nanoid": "^5.0.7",
|
||||||
"vue": "^3.4.34",
|
"vue": "^3.4.35",
|
||||||
"vue-router": "^4.4.0",
|
"vue-router": "^4.4.2",
|
||||||
"vuepress-plugin-md-enhance": "2.0.0-rc.52",
|
"vuepress-plugin-md-enhance": "2.0.0-rc.52",
|
||||||
"vuepress-plugin-md-power": "workspace:*"
|
"vuepress-plugin-md-power": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@iconify/json": "^2.2.231"
|
"@iconify/json": "^2.2.234"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user