refactor: update package to pure esmodule
This commit is contained in:
parent
3789443485
commit
517c8bc697
@ -3,7 +3,7 @@ import { themePlume } from '@vuepress-plume/vuepress-theme-plume'
|
|||||||
import { viteBundler } from '@vuepress/bundler-vite'
|
import { viteBundler } from '@vuepress/bundler-vite'
|
||||||
import { webpackBundler } from '@vuepress/bundler-webpack'
|
import { webpackBundler } from '@vuepress/bundler-webpack'
|
||||||
import { defineUserConfig } from '@vuepress/cli'
|
import { defineUserConfig } from '@vuepress/cli'
|
||||||
import notes from './notes'
|
import notes from './notes.js'
|
||||||
|
|
||||||
export default defineUserConfig({
|
export default defineUserConfig({
|
||||||
base: '/',
|
base: '/',
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "docs",
|
"name": "docs",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs:build": "vuepress-cli build --clean-cache",
|
"docs:build": "vuepress-cli build --clean-cache",
|
||||||
"docs:clean": "rimraf .vuepress/.temp .vuepress/.cache .vuepress/dist",
|
"docs:clean": "rimraf .vuepress/.temp .vuepress/.cache .vuepress/dist",
|
||||||
@ -9,15 +10,15 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuepress-plume/vuepress-theme-plume": "workspace:*",
|
"@vuepress-plume/vuepress-theme-plume": "workspace:*",
|
||||||
"@vuepress/bundler-vite": "2.0.0-beta.49",
|
"@vuepress/bundler-vite": "2.0.0-beta.51",
|
||||||
"@vuepress/bundler-webpack": "2.0.0-beta.49",
|
"@vuepress/bundler-webpack": "2.0.0-beta.51",
|
||||||
"@vuepress/cli": "2.0.0-beta.49",
|
"@vuepress/cli": "2.0.0-beta.51",
|
||||||
"@vuepress/client": "2.0.0-beta.49",
|
"@vuepress/client": "2.0.0-beta.51",
|
||||||
"@vuepress/utils": "2.0.0-beta.49",
|
"@vuepress/utils": "2.0.0-beta.51",
|
||||||
"anywhere": "^1.5.0",
|
"anywhere": "^1.6.0",
|
||||||
"leancloud-storage": "^4.12.2",
|
"leancloud-storage": "^4.13.2",
|
||||||
"sass": "^1.51.0",
|
"sass": "^1.55.0",
|
||||||
"sass-loader": "^13.0.2",
|
"sass-loader": "^13.1.0",
|
||||||
"vue": "^3.2.37"
|
"vue": "^3.2.41"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
47
package.json
47
package.json
@ -13,8 +13,9 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "pengzhanbo",
|
"author": "pengzhanbo",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"autoUpdate": "ts-node scripts/autoInstall.ts",
|
"autoUpdate": "node scripts/autoInstall.js",
|
||||||
"build": "pnpm run build:package",
|
"build": "pnpm run build:package",
|
||||||
"build:package": "pnpm --filter=!vuepress-theme-plume run -r --stream build",
|
"build:package": "pnpm --filter=!vuepress-theme-plume run -r --stream build",
|
||||||
"commit": "cz",
|
"commit": "cz",
|
||||||
@ -26,7 +27,7 @@
|
|||||||
"docs:clean": "pnpm --filter=docs docs:clean",
|
"docs:clean": "pnpm --filter=docs docs:clean",
|
||||||
"docs:serve": "pnpm --filter=docs docs:serve",
|
"docs:serve": "pnpm --filter=docs docs:serve",
|
||||||
"lint": "eslint --ext .js,.ts,.vue .",
|
"lint": "eslint --ext .js,.ts,.vue .",
|
||||||
"pkg": "ts-node scripts/create/index.ts",
|
"pkg": "node scripts/create/index.js",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"release": "pnpm release:check && pnpm release:version && pnpm release:publish",
|
"release": "pnpm release:check && pnpm release:version && pnpm release:publish",
|
||||||
"release:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
"release:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
||||||
@ -46,36 +47,38 @@
|
|||||||
},
|
},
|
||||||
"prettier": "prettier-config-vuepress",
|
"prettier": "prettier-config-vuepress",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^16.2.3",
|
"@commitlint/cli": "^17.1.2",
|
||||||
"@commitlint/config-conventional": "^16.2.1",
|
"@commitlint/config-conventional": "^17.1.0",
|
||||||
"@types/minimist": "^1.2.2",
|
"@types/minimist": "^1.2.2",
|
||||||
"@types/node": "^17.0.30",
|
"@types/node": "18.8.0",
|
||||||
"@types/webpack-env": "^1.16.4",
|
"@types/webpack-env": "^1.18.0",
|
||||||
"bumpp": "^7.2.0",
|
"bumpp": "^8.2.1",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^5.1.2",
|
||||||
"commitizen": "^4.2.4",
|
"commitizen": "^4.2.5",
|
||||||
"concurrently": "^7.0.0",
|
"concurrently": "^7.4.0",
|
||||||
"conventional-changelog-cli": "^2.2.2",
|
"conventional-changelog-cli": "^2.2.2",
|
||||||
"cpx2": "^4.2.0",
|
"cpx2": "^4.2.0",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"cz-conventional-changelog": "^3.3.0",
|
"cz-conventional-changelog": "^3.3.0",
|
||||||
"eslint": "^8.20.0",
|
"eslint": "^8.25.0",
|
||||||
"eslint-config-vuepress": "^3.10.0",
|
"eslint-config-vuepress": "^4.0.3",
|
||||||
"eslint-config-vuepress-typescript": "^2.9.1",
|
"eslint-config-vuepress-typescript": "^4.0.3",
|
||||||
"execa": "^5.1.1",
|
"execa": "^6.1.0",
|
||||||
"handlebars": "^4.7.7",
|
"handlebars": "^4.7.7",
|
||||||
"husky": "^7.0.4",
|
"husky": "^8.0.1",
|
||||||
"lint-staged": "^12.4.0",
|
"lint-staged": "^13.0.3",
|
||||||
"minimist": "^1.2.6",
|
"minimist": "^1.2.7",
|
||||||
"ora": "^5.4.1",
|
"ora": "^6.1.2",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"prettier-config-vuepress": "^1.4.0",
|
"prettier-config-vuepress": "^4.0.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"sort-package-json": "^1.55.0",
|
"sort-package-json": "^2.0.0",
|
||||||
|
"taze": "^0.8.2",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^4.7.4",
|
"typescript": "^4.8.4",
|
||||||
"vite": "^2.9.14"
|
"vite": "^3.1.8"
|
||||||
},
|
},
|
||||||
|
"packageManager": "pnpm@7.13.4",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14",
|
"node": ">=14",
|
||||||
"pnpm": ">=6"
|
"pnpm": ">=6"
|
||||||
|
|||||||
@ -11,8 +11,14 @@
|
|||||||
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git"
|
"url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
"author": "pengzhanbo <volodymyr@foxmail.com> (https://github.com/pengzhanbo/)",
|
||||||
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": "./lib/node/index.js",
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
"main": "lib/node/index.js",
|
"main": "lib/node/index.js",
|
||||||
|
"types": "./lib/node/index.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
@ -20,16 +26,13 @@
|
|||||||
"build": "pnpm run clean && pnpm run copy && pnpm run ts",
|
"build": "pnpm run clean && pnpm run copy && pnpm run ts",
|
||||||
"clean": "rimraf lib *.tsbuildinfo",
|
"clean": "rimraf lib *.tsbuildinfo",
|
||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"copy:watch": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib -w",
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
"dev": "concurrently \"pnpm copy:watch\" \"pnpm ts:watch\"",
|
|
||||||
"ts": "tsc -b tsconfig.build.json",
|
|
||||||
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuepress/client": "2.0.0-beta.49",
|
"@vuepress/client": "2.0.0-beta.51",
|
||||||
"@vuepress/core": "2.0.0-beta.49",
|
"@vuepress/core": "2.0.0-beta.51",
|
||||||
"@vuepress/shared": "2.0.0-beta.49",
|
"@vuepress/shared": "2.0.0-beta.51",
|
||||||
"@vuepress/utils": "2.0.0-beta.49"
|
"@vuepress/utils": "2.0.0-beta.51"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { baiduTongjiPlugin } from './plugin'
|
import { baiduTongjiPlugin } from './plugin.js'
|
||||||
|
|
||||||
export * from './plugin'
|
export * from './plugin.js'
|
||||||
|
|
||||||
export default baiduTongjiPlugin
|
export default baiduTongjiPlugin
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"references": [
|
"compilerOptions": {
|
||||||
{
|
"rootDir": "./src",
|
||||||
"path": "./tsconfig.cjs.json"
|
"outDir": "./lib"
|
||||||
}
|
},
|
||||||
],
|
"include": ["./src"],
|
||||||
"files": []
|
"files": []
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "CommonJS",
|
|
||||||
"rootDir": "./src",
|
|
||||||
"outDir": "./lib"
|
|
||||||
},
|
|
||||||
"include": ["./src/node"]
|
|
||||||
}
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "ES2020",
|
|
||||||
"rootDir": "./src",
|
|
||||||
"outDir": "./lib",
|
|
||||||
"types": ["@vuepress/client/types"]
|
|
||||||
},
|
|
||||||
"include": ["./src/client"]
|
|
||||||
}
|
|
||||||
@ -19,27 +19,30 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
||||||
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": "./lib/node/index.js",
|
||||||
|
"./client": "./lib/client/index.js",
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
"main": "lib/node/index.js",
|
"main": "lib/node/index.js",
|
||||||
|
"types": "./lib/node/index.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "pnpm run clean && pnpm run ts",
|
"build": "pnpm run clean && pnpm run ts",
|
||||||
"clean": "rimraf lib *.tsbuildinfo",
|
"clean": "rimraf lib *.tsbuildinfo",
|
||||||
"dev": "pnpm run ts:watch",
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
"ts": "tsc -b tsconfig.build.json",
|
|
||||||
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuepress/cli": "2.0.0-beta.49",
|
"@types/markdown-it": "^12.2.3",
|
||||||
"@vuepress/client": "2.0.0-beta.49",
|
"@vuepress/cli": "2.0.0-beta.51",
|
||||||
"@vuepress/core": "2.0.0-beta.49",
|
"@vuepress/client": "2.0.0-beta.51",
|
||||||
"@vuepress/utils": "2.0.0-beta.49",
|
"@vuepress/core": "2.0.0-beta.51",
|
||||||
|
"@vuepress/utils": "2.0.0-beta.51",
|
||||||
"markdown-it-container": "^3.0.0"
|
"markdown-it-container": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
|
||||||
"@types/markdown-it": "^12.2.3"
|
|
||||||
},
|
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { defineClientConfig } from '@vuepress/client'
|
import { defineClientConfig } from '@vuepress/client'
|
||||||
import type { CanIUseMode } from '../shared'
|
import type { CanIUseMode } from '../shared/index.js'
|
||||||
import { resolveCanIUse } from './resolveCanIUse'
|
import { resolveCanIUse } from './resolveCanIUse.js'
|
||||||
|
|
||||||
declare const __CAN_I_USE_INJECT_MODE__: CanIUseMode
|
declare const __CAN_I_USE_INJECT_MODE__: CanIUseMode
|
||||||
declare const __VUEPRESS_SSR__: boolean
|
declare const __VUEPRESS_SSR__: boolean
|
||||||
|
|||||||
1
packages/plugin-caniuse/src/client/index.ts
Normal file
1
packages/plugin-caniuse/src/client/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from '../shared/index.js'
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { caniusePlugin } from './plugin'
|
import { caniusePlugin } from './plugin.js'
|
||||||
|
|
||||||
export * from './plugin'
|
export * from './plugin.js'
|
||||||
export * from '../shared'
|
export * from '../shared/index.js'
|
||||||
|
|
||||||
export default caniusePlugin
|
export default caniusePlugin
|
||||||
|
|||||||
5
packages/plugin-caniuse/src/node/markdown-it-container.d.ts
vendored
Normal file
5
packages/plugin-caniuse/src/node/markdown-it-container.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
declare module 'markdown-it-container' {
|
||||||
|
import type { PluginWithParams } from 'markdown-it'
|
||||||
|
const container: PluginWithParams
|
||||||
|
export = container
|
||||||
|
}
|
||||||
@ -1,10 +1,11 @@
|
|||||||
import type { Plugin, PluginObject } from '@vuepress/core'
|
import type { Plugin, PluginObject } from '@vuepress/core'
|
||||||
import { path } from '@vuepress/utils'
|
import { getDirname, path } from '@vuepress/utils'
|
||||||
import * as container from 'markdown-it-container'
|
import container from 'markdown-it-container'
|
||||||
import type * as Token from 'markdown-it/lib/token'
|
import type Token from 'markdown-it/lib/token.js'
|
||||||
import type { CanIUseMode, CanIUsePluginOptions } from '../shared'
|
import type { CanIUseMode, CanIUsePluginOptions } from '../shared/index.js'
|
||||||
import { resolveCanIUse } from './resolveCanIUse'
|
import { resolveCanIUse } from './resolveCanIUse.js'
|
||||||
|
|
||||||
|
const __dirname = getDirname(import.meta.url)
|
||||||
const modeMap: CanIUseMode[] = ['image', 'embed']
|
const modeMap: CanIUseMode[] = ['image', 'embed']
|
||||||
const isMode = (mode: CanIUseMode): boolean => modeMap.includes(mode)
|
const isMode = (mode: CanIUseMode): boolean => modeMap.includes(mode)
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import type { CanIUseMode } from '../shared'
|
import type { CanIUseMode } from '../shared/index.js'
|
||||||
export const resolveCanIUse = (feature: string, mode: CanIUseMode): string => {
|
export const resolveCanIUse = (feature: string, mode: CanIUseMode): string => {
|
||||||
const before =
|
const before =
|
||||||
mode === 'embed'
|
mode === 'embed'
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
export * from './caniuse'
|
export * from './caniuse.js'
|
||||||
|
|||||||
@ -1,12 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../tsconfig.build.json",
|
||||||
"references": [
|
"compilerOptions": {
|
||||||
{
|
"rootDir": "./src",
|
||||||
"path": "./tsconfig.esm.json"
|
"outDir": "./lib"
|
||||||
},
|
},
|
||||||
{
|
"include": ["./src"]
|
||||||
"path": "./tsconfig.cjs.json"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"files": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "CommonJS",
|
|
||||||
"rootDir": "./src",
|
|
||||||
"outDir": "./lib"
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"./src/node",
|
|
||||||
"./src/shared"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "ES2020",
|
|
||||||
"rootDir": "./src",
|
|
||||||
"outDir": "./lib",
|
|
||||||
"types": [
|
|
||||||
"@vuepress/client/types"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"./src/client",
|
|
||||||
"./src/shared"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -12,7 +12,14 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
||||||
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": "./lib/node/index.js",
|
||||||
|
"./client": "./lib/client/index.js",
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
"main": "lib/node/index.js",
|
"main": "lib/node/index.js",
|
||||||
|
"types": "./lib/node/index.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
@ -20,18 +27,15 @@
|
|||||||
"build": "pnpm run clean && pnpm run copy && pnpm run ts",
|
"build": "pnpm run clean && pnpm run copy && pnpm run ts",
|
||||||
"clean": "rimraf lib *.tsbuildinfo",
|
"clean": "rimraf lib *.tsbuildinfo",
|
||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"copy:watch": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib -w",
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
"dev": "concurrently \"pnpm copy:watch\" \"pnpm ts:watch\"",
|
|
||||||
"ts": "tsc -b tsconfig.build.json",
|
|
||||||
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuepress/client": "2.0.0-beta.49",
|
"@vuepress/client": "2.0.0-beta.51",
|
||||||
"@vuepress/core": "2.0.0-beta.49",
|
"@vuepress/core": "2.0.0-beta.51",
|
||||||
"@vuepress/shared": "2.0.0-beta.49",
|
"@vuepress/shared": "2.0.0-beta.51",
|
||||||
"@vuepress/utils": "2.0.0-beta.49",
|
"@vuepress/utils": "2.0.0-beta.51",
|
||||||
"vue": "^3.2.37",
|
"vue": "^3.2.41",
|
||||||
"vue-router": "4.1.2"
|
"vue-router": "4.1.5"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { defineClientConfig } from '@vuepress/client'
|
import { defineClientConfig } from '@vuepress/client'
|
||||||
import { setupCopyCode } from './composables'
|
import { setupCopyCode } from './composables/index.js'
|
||||||
|
|
||||||
import './styles/button.scss'
|
import './styles/button.scss'
|
||||||
|
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
export * from './setup'
|
export * from './setup.js'
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
// import { useRouteLocale } from '@vuepress/client'
|
// import { useRouteLocale } from '@vuepress/client'
|
||||||
import { onMounted, watch } from 'vue'
|
import { onMounted, watch } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import type { CopyCodeOptions } from '../../shared'
|
import type { CopyCodeOptions } from '../../shared/index.js'
|
||||||
import { copySVG, successSVG } from '../svg'
|
import { copySVG, successSVG } from '../svg.js'
|
||||||
import { copyToClipboard } from './copyToClipboard'
|
import { copyToClipboard } from './copyToClipboard.js'
|
||||||
declare const __COPY_CODE_OPTIONS__: CopyCodeOptions
|
declare const __COPY_CODE_OPTIONS__: CopyCodeOptions
|
||||||
// declare const __COPY_CODE_LOCALES_OPTIONS__: CopyCodeLocaleOption
|
// declare const __COPY_CODE_LOCALES_OPTIONS__: CopyCodeLocaleOption
|
||||||
|
|
||||||
|
|||||||
1
packages/plugin-copy-code/src/client/index.ts
Normal file
1
packages/plugin-copy-code/src/client/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from '../shared/index.js'
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { copyCodePlugin } from './plugin'
|
import { copyCodePlugin } from './plugin.js'
|
||||||
|
|
||||||
export * from './plugin'
|
export * from './plugin.js'
|
||||||
export * from '../shared'
|
export * from '../shared/index.js'
|
||||||
|
|
||||||
export default copyCodePlugin
|
export default copyCodePlugin
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
import type { Plugin } from '@vuepress/core'
|
import type { Plugin } from '@vuepress/core'
|
||||||
import { path } from '@vuepress/utils'
|
import { getDirname, path } from '@vuepress/utils'
|
||||||
import type { CopyCodeLocaleOption, CopyCodeOptions } from '../shared'
|
import type { CopyCodeLocaleOption, CopyCodeOptions } from '../shared/index.js'
|
||||||
|
|
||||||
|
const __dirname = getDirname(import.meta.url)
|
||||||
|
|
||||||
const defaultOptions: CopyCodeOptions = {
|
const defaultOptions: CopyCodeOptions = {
|
||||||
selector: '.theme-default-content div[class*="language-"] pre',
|
selector: '.theme-default-content div[class*="language-"] pre',
|
||||||
|
|||||||
@ -1,12 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../tsconfig.build.json",
|
||||||
"references": [
|
"compilerOptions": {
|
||||||
{
|
"rootDir": "./src",
|
||||||
"path": "./tsconfig.esm.json"
|
"outDir": "./lib"
|
||||||
},
|
},
|
||||||
{
|
"include": ["./src"]
|
||||||
"path": "./tsconfig.cjs.json"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"files": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "CommonJS",
|
|
||||||
"rootDir": "./src",
|
|
||||||
"outDir": "./lib"
|
|
||||||
},
|
|
||||||
"include": ["./src/node", "./src/shared"]
|
|
||||||
}
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "ES2020",
|
|
||||||
"rootDir": "./src",
|
|
||||||
"outDir": "./lib",
|
|
||||||
"types": ["@vuepress/client/types"]
|
|
||||||
},
|
|
||||||
"include": ["./src/client", "./src/shared"]
|
|
||||||
}
|
|
||||||
@ -20,7 +20,13 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
||||||
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": "./lib/node/index.js",
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
"main": "lib/node/index.js",
|
"main": "lib/node/index.js",
|
||||||
|
"types": "lib/node/index.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
@ -28,24 +34,25 @@
|
|||||||
"build": "pnpm run clean && pnpm run copy && pnpm run ts",
|
"build": "pnpm run clean && pnpm run copy && pnpm run ts",
|
||||||
"clean": "rimraf lib *.tsbuildinfo",
|
"clean": "rimraf lib *.tsbuildinfo",
|
||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"copy:watch": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib -w",
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
"dev": "concurrently \"pnpm copy:watch\" \"pnpm ts:watch\"",
|
|
||||||
"ts": "tsc -b tsconfig.build.json",
|
|
||||||
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iarna/toml": "^2.2.5",
|
"@iarna/toml": "^2.2.5",
|
||||||
"@netlify/functions": "^1.0.0",
|
"@netlify/functions": "^1.3.0",
|
||||||
"@vuepress/core": "2.0.0-beta.49",
|
"@vuepress/core": "2.0.0-beta.51",
|
||||||
"@vuepress/shared": "2.0.0-beta.49",
|
"@vuepress/shared": "2.0.0-beta.51",
|
||||||
"@vuepress/utils": "2.0.0-beta.49",
|
"@vuepress/utils": "2.0.0-beta.51",
|
||||||
|
"chalk": "^5.1.2",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"cpx2": "^4.2.0",
|
"cpx2": "^4.2.0",
|
||||||
"dotenv": "^16.0.1",
|
"dotenv": "^16.0.3",
|
||||||
"esbuild": "^0.14.39",
|
"esbuild": "^0.15.11",
|
||||||
"execa": "5.1.1",
|
"execa": "^6.1.0",
|
||||||
"netlify-cli": "^10.10.2",
|
"netlify-cli": "^12.0.9",
|
||||||
"portfinder": "^1.0.28"
|
"portfinder": "^1.0.32"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^18.8.5"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { App } from '@vuepress/core'
|
import type { App } from '@vuepress/core'
|
||||||
import type { NetlifyFunctionsPluginOptions } from '../shared'
|
import type { NetlifyFunctionsPluginOptions } from '../shared/index.js'
|
||||||
export const extendsBundlerOptions = (
|
export const extendsBundlerOptions = (
|
||||||
bundlerOption: any,
|
bundlerOption: any,
|
||||||
app: App,
|
app: App,
|
||||||
@ -25,7 +25,8 @@ export const extendsBundlerOptions = (
|
|||||||
}
|
}
|
||||||
if (app.options.bundler.name === '@vuepress/bundler-webpack') {
|
if (app.options.bundler.name === '@vuepress/bundler-webpack') {
|
||||||
const rewritePath = `^${options.proxyPrefix}`
|
const rewritePath = `^${options.proxyPrefix}`
|
||||||
bundlerOption.configureWebpack((config, isServer, isBuild) => {
|
bundlerOption.configureWebpack(
|
||||||
|
(config: any, isServer: boolean, isBuild: boolean) => {
|
||||||
if (isBuild) return
|
if (isBuild) return
|
||||||
config.devServer = config.devServer || {}
|
config.devServer = config.devServer || {}
|
||||||
config.devServer.proxy = Object.assign(config.devServer.proxy || {}, {
|
config.devServer.proxy = Object.assign(config.devServer.proxy || {}, {
|
||||||
@ -35,6 +36,7 @@ export const extendsBundlerOptions = (
|
|||||||
pathRewrite: { [rewritePath]: targetPath },
|
pathRewrite: { [rewritePath]: targetPath },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import type { NetlifyFunctionsOptions } from '../shared'
|
import type { NetlifyFunctionsOptions } from '../shared/index.js'
|
||||||
import { netlifyFunctionsPlugin } from './plugin'
|
import { netlifyFunctionsPlugin } from './plugin.js'
|
||||||
|
|
||||||
export * from './useNetlifyFunctionsPlugins'
|
export * from './useNetlifyFunctionsPlugins.js'
|
||||||
|
|
||||||
export { NetlifyFunctionsOptions }
|
export { NetlifyFunctionsOptions }
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
export * from './initFunctions'
|
export * from './initFunctions.js'
|
||||||
export * from './netlifyConfig'
|
export * from './netlifyConfig.js'
|
||||||
export * from './netlifyServer'
|
export * from './netlifyServer.js'
|
||||||
|
|||||||
@ -2,8 +2,8 @@ import type { App } from '@vuepress/core'
|
|||||||
import { path } from '@vuepress/utils'
|
import { path } from '@vuepress/utils'
|
||||||
import * as chokidar from 'chokidar'
|
import * as chokidar from 'chokidar'
|
||||||
import esbuild from 'esbuild'
|
import esbuild from 'esbuild'
|
||||||
import type { NetlifyFunctionsPluginOptions } from '../../shared'
|
import type { NetlifyFunctionsPluginOptions } from '../../shared/index.js'
|
||||||
import { readFileList } from '../utils'
|
import { readFileList } from '../utils/index.js'
|
||||||
|
|
||||||
export const generateFunctions = async (
|
export const generateFunctions = async (
|
||||||
app: App,
|
app: App,
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import type { JsonMap } from '@iarna/toml'
|
|||||||
import { parse, stringify } from '@iarna/toml'
|
import { parse, stringify } from '@iarna/toml'
|
||||||
import type { App } from '@vuepress/core'
|
import type { App } from '@vuepress/core'
|
||||||
import { fs, path } from '@vuepress/utils'
|
import { fs, path } from '@vuepress/utils'
|
||||||
import type { NetlifyFunctionsPluginOptions } from '../../shared'
|
import type { NetlifyFunctionsPluginOptions } from '../../shared/index.js'
|
||||||
|
|
||||||
export interface NetlifyConfig {
|
export interface NetlifyConfig {
|
||||||
functions: Record<string, any>
|
functions: Record<string, any>
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
import { fs, path } from '@vuepress/utils'
|
import { fs, getDirname, path } from '@vuepress/utils'
|
||||||
import dotenv from 'dotenv'
|
import dotenv from 'dotenv'
|
||||||
import * as execa from 'execa'
|
import { execa } from 'execa'
|
||||||
import * as portFinder from 'portfinder'
|
import * as portFinder from 'portfinder'
|
||||||
import type { NetlifyFunctionsPluginOptions } from '../../shared'
|
import type { NetlifyFunctionsPluginOptions } from '../../shared/index.js'
|
||||||
|
|
||||||
|
const __dirname = getDirname(import.meta.url)
|
||||||
|
|
||||||
const loadEnvConfig = (): Record<string, string | undefined> => {
|
const loadEnvConfig = (): Record<string, string | undefined> => {
|
||||||
const configPath = path.resolve(process.cwd(), '.env')
|
const configPath = path.resolve(process.cwd(), '.env')
|
||||||
|
|||||||
@ -29,15 +29,15 @@ import type { App, Plugin } from '@vuepress/core'
|
|||||||
import type {
|
import type {
|
||||||
NetlifyFunctionsOptions,
|
NetlifyFunctionsOptions,
|
||||||
NetlifyFunctionsPluginOptions,
|
NetlifyFunctionsPluginOptions,
|
||||||
} from '../shared'
|
} from '../shared/index.js'
|
||||||
import { extendsBundlerOptions } from './extendsBundlerOptions'
|
import { extendsBundlerOptions } from './extendsBundlerOptions.js'
|
||||||
import type { NetlifyServe } from './netlify'
|
import type { NetlifyServe } from './netlify/index.js'
|
||||||
import {
|
import {
|
||||||
generateFunctions,
|
generateFunctions,
|
||||||
generateNetlifyConfig,
|
generateNetlifyConfig,
|
||||||
initialFunctions,
|
initialFunctions,
|
||||||
netlifyServe,
|
netlifyServe,
|
||||||
} from './netlify'
|
} from './netlify/index.js'
|
||||||
|
|
||||||
const initOptions = (
|
const initOptions = (
|
||||||
app: App,
|
app: App,
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import type { App, PluginObject } from '@vuepress/core'
|
import type { App, PluginObject } from '@vuepress/core'
|
||||||
import { path } from '@vuepress/utils'
|
import { path } from '@vuepress/utils'
|
||||||
import * as cpx2 from 'cpx2'
|
import * as cpx2 from 'cpx2'
|
||||||
import type { UseNetlifyFunctionPluginsOptions } from '../shared'
|
import type { UseNetlifyFunctionPluginsOptions } from '../shared/index.js'
|
||||||
import { getOptions, netlifyFunctionsPlugin } from './plugin'
|
import { getOptions, netlifyFunctionsPlugin } from './plugin.js'
|
||||||
|
|
||||||
interface UseNetlifyFunctionResult {
|
interface UseNetlifyFunctionResult {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
export * from './readFileList'
|
export * from './readFileList.js'
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../tsconfig.build.json",
|
||||||
"references": [
|
"compilerOptions": {
|
||||||
{
|
"rootDir": "./src",
|
||||||
"path": "./tsconfig.cjs.json"
|
"outDir": "./lib"
|
||||||
}
|
},
|
||||||
],
|
"include": ["./src"]
|
||||||
"files": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "CommonJS",
|
|
||||||
"rootDir": "./src",
|
|
||||||
"outDir": "./lib"
|
|
||||||
},
|
|
||||||
"include": ["./src/node", "./src/shared"]
|
|
||||||
}
|
|
||||||
@ -13,7 +13,14 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
||||||
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": "./lib/node/index.js",
|
||||||
|
"./client": "./lib/client/index.js",
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
"main": "lib/node/index.js",
|
"main": "lib/node/index.js",
|
||||||
|
"types": "lib/node/index.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
@ -21,21 +28,18 @@
|
|||||||
"build": "pnpm run clean && pnpm run copy && pnpm run ts",
|
"build": "pnpm run clean && pnpm run copy && pnpm run ts",
|
||||||
"clean": "rimraf lib *.tsbuildinfo",
|
"clean": "rimraf lib *.tsbuildinfo",
|
||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"copy:watch": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib -w",
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
"dev": "concurrently \"pnpm copy:watch\" \"pnpm ts:watch\"",
|
|
||||||
"ts": "tsc -b tsconfig.build.json",
|
|
||||||
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@netlify/functions": "^1.0.0",
|
"@netlify/functions": "^1.3.0",
|
||||||
"@vuepress-plume/vuepress-plugin-netlify-functions": "workspace:*",
|
"@vuepress-plume/vuepress-plugin-netlify-functions": "workspace:*",
|
||||||
"@vuepress/client": "2.0.0-beta.49",
|
"@vuepress/client": "2.0.0-beta.51",
|
||||||
"@vuepress/core": "2.0.0-beta.49",
|
"@vuepress/core": "2.0.0-beta.51",
|
||||||
"@vuepress/shared": "2.0.0-beta.49",
|
"@vuepress/shared": "2.0.0-beta.51",
|
||||||
"@vuepress/utils": "2.0.0-beta.49",
|
"@vuepress/utils": "2.0.0-beta.51",
|
||||||
"leancloud-storage": "^4.12.2",
|
"leancloud-storage": "^4.13.2",
|
||||||
"vue": "^3.2.37",
|
"vue": "^3.2.41",
|
||||||
"vue-router": "4.1.2"
|
"vue-router": "4.1.5"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { defineClientConfig } from '@vuepress/client'
|
import { defineClientConfig } from '@vuepress/client'
|
||||||
import Collection from './components/PageCollection'
|
import Collection from './components/PageCollection.js'
|
||||||
|
|
||||||
export default defineClientConfig({
|
export default defineClientConfig({
|
||||||
enhance({ app }) {
|
enhance({ app }) {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { defineComponent, h } from 'vue'
|
import { defineComponent, h } from 'vue'
|
||||||
import { usePageCollection } from '../composables'
|
import { usePageCollection } from '../composables/index.js'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'PageCollection',
|
name: 'PageCollection',
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
export * from './usePageCollection'
|
export * from './usePageCollection.js'
|
||||||
|
|||||||
4
packages/plugin-page-collection/src/client/index.ts
Normal file
4
packages/plugin-page-collection/src/client/index.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
import Collection from './components/PageCollection.js'
|
||||||
|
export * from '../shared/index.js'
|
||||||
|
|
||||||
|
export { Collection }
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import { pageCollectionPlugin } from './plugin'
|
import { pageCollectionPlugin } from './plugin.js'
|
||||||
|
|
||||||
export * from './plugin'
|
export * from './plugin.js'
|
||||||
export * from '../shared'
|
export * from '../shared/index.js'
|
||||||
|
|
||||||
export default pageCollectionPlugin
|
export default pageCollectionPlugin
|
||||||
|
|||||||
@ -8,8 +8,10 @@
|
|||||||
// netlify functions 开发时支持
|
// netlify functions 开发时支持
|
||||||
import { useNetlifyFunctionsPlugin } from '@vuepress-plume/vuepress-plugin-netlify-functions'
|
import { useNetlifyFunctionsPlugin } from '@vuepress-plume/vuepress-plugin-netlify-functions'
|
||||||
import type { App, Plugin } from '@vuepress/core'
|
import type { App, Plugin } from '@vuepress/core'
|
||||||
import { path } from '@vuepress/utils'
|
import { getDirname, path } from '@vuepress/utils'
|
||||||
import type { PageCollectionOptions } from '../shared'
|
import type { PageCollectionOptions } from '../shared/index.js'
|
||||||
|
|
||||||
|
const __dirname = getDirname(import.meta.url)
|
||||||
|
|
||||||
export const pageCollectionPlugin = (
|
export const pageCollectionPlugin = (
|
||||||
options: PageCollectionOptions = {}
|
options: PageCollectionOptions = {}
|
||||||
|
|||||||
@ -1,12 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../tsconfig.build.json",
|
||||||
"references": [
|
"compilerOptions": {
|
||||||
{
|
"rootDir": "./src",
|
||||||
"path": "./tsconfig.esm.json"
|
"outDir": "./lib"
|
||||||
},
|
},
|
||||||
{
|
"include": ["./src"]
|
||||||
"path": "./tsconfig.cjs.json"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"files": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "CommonJS",
|
|
||||||
"rootDir": "./src",
|
|
||||||
"outDir": "./lib"
|
|
||||||
},
|
|
||||||
"include": ["./src/node", "./src/shared"]
|
|
||||||
}
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "ES2020",
|
|
||||||
"rootDir": "./src",
|
|
||||||
"outDir": "./lib",
|
|
||||||
"types": ["@vuepress/client/types"]
|
|
||||||
},
|
|
||||||
"include": ["./src/client", "./src/shared"]
|
|
||||||
}
|
|
||||||
@ -12,7 +12,13 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
||||||
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": "./lib/node/index.js",
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
"main": "lib/node/index.js",
|
"main": "lib/node/index.js",
|
||||||
|
"types": "lib/node/index.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
@ -20,19 +26,16 @@
|
|||||||
"build": "pnpm run clean && pnpm run copy && pnpm run ts",
|
"build": "pnpm run clean && pnpm run copy && pnpm run ts",
|
||||||
"clean": "rimraf lib *.tsbuildinfo",
|
"clean": "rimraf lib *.tsbuildinfo",
|
||||||
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib",
|
||||||
"copy:watch": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib -w",
|
"ts": "tsc -b tsconfig.build.json"
|
||||||
"dev": "concurrently \"pnpm copy:watch\" \"pnpm ts:watch\"",
|
|
||||||
"ts": "tsc -b tsconfig.build.json",
|
|
||||||
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuepress/client": "2.0.0-beta.49",
|
"@vuepress/client": "2.0.0-beta.51",
|
||||||
"@vuepress/core": "2.0.0-beta.49",
|
"@vuepress/core": "2.0.0-beta.51",
|
||||||
"@vuepress/shared": "2.0.0-beta.49",
|
"@vuepress/shared": "2.0.0-beta.51",
|
||||||
"@vuepress/utils": "2.0.0-beta.49",
|
"@vuepress/utils": "2.0.0-beta.51",
|
||||||
"vite-plugin-windicss": "^1.8.7",
|
"vite-plugin-windicss": "^1.8.8",
|
||||||
"windicss": "^3.5.6",
|
"windicss": "^3.5.6",
|
||||||
"windicss-webpack-plugin": "^1.7.5"
|
"windicss-webpack-plugin": "^1.7.6"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { windiCSSPlugin } from './plugin'
|
import { windiCSSPlugin } from './plugin.js'
|
||||||
|
|
||||||
export * from './plugin'
|
export * from './plugin.js'
|
||||||
|
|
||||||
export default windiCSSPlugin
|
export default windiCSSPlugin
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
import type { App, Plugin } from '@vuepress/core'
|
import type { App, Plugin } from '@vuepress/core'
|
||||||
import { path } from '@vuepress/utils'
|
import { getDirname, path } from '@vuepress/utils'
|
||||||
import type { UserOptions, WindiPluginUtilsOptions } from 'vite-plugin-windicss'
|
|
||||||
import viteWindiCSS from 'vite-plugin-windicss'
|
import viteWindiCSS from 'vite-plugin-windicss'
|
||||||
|
import type { UserOptions, WindiPluginUtilsOptions } from 'vite-plugin-windicss'
|
||||||
import WebpackWindiCSSPlugin from 'windicss-webpack-plugin'
|
import WebpackWindiCSSPlugin from 'windicss-webpack-plugin'
|
||||||
|
|
||||||
|
const __dirname = getDirname(import.meta.url)
|
||||||
export interface WindiCSSOptions {
|
export interface WindiCSSOptions {
|
||||||
userOptions?: UserOptions
|
userOptions?: UserOptions
|
||||||
utilsOptions?: WindiPluginUtilsOptions
|
utilsOptions?: WindiPluginUtilsOptions
|
||||||
|
|||||||
17
packages/plugin-windicss/src/node/windicss.d.ts
vendored
Normal file
17
packages/plugin-windicss/src/node/windicss.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
declare module 'windicss-webpack-plugin' {
|
||||||
|
const result: any
|
||||||
|
|
||||||
|
export default result
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'vite-plugin-windicss' {
|
||||||
|
const result: any
|
||||||
|
|
||||||
|
type UserOptions = any
|
||||||
|
|
||||||
|
type WindiPluginUtilsOptions = any
|
||||||
|
|
||||||
|
export default result
|
||||||
|
|
||||||
|
export { UserOptions, WindiPluginUtilsOptions }
|
||||||
|
}
|
||||||
@ -1,12 +1,8 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.base.json",
|
"extends": "../tsconfig.build.json",
|
||||||
"references": [
|
"compilerOptions": {
|
||||||
{
|
"rootDir": "./src",
|
||||||
"path": "./tsconfig.esm.json"
|
"outDir": "./lib"
|
||||||
},
|
},
|
||||||
{
|
"include": ["./src"]
|
||||||
"path": "./tsconfig.cjs.json"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"files": []
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "CommonJS",
|
|
||||||
"rootDir": "./src",
|
|
||||||
"outDir": "./lib"
|
|
||||||
},
|
|
||||||
"include": ["./src/node", "./src/shared"]
|
|
||||||
}
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.base.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "ES2020",
|
|
||||||
"rootDir": "./src",
|
|
||||||
"outDir": "./lib",
|
|
||||||
"types": ["@vuepress/client/types"]
|
|
||||||
},
|
|
||||||
"include": ["./src/client", "./src/shared"]
|
|
||||||
}
|
|
||||||
@ -20,6 +20,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
"author": "pengzhanbo <volodymyr@foxmail.com>",
|
||||||
|
"type": "module",
|
||||||
"main": "lib/node/index.js",
|
"main": "lib/node/index.js",
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
@ -35,42 +36,42 @@
|
|||||||
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/lodash.merge": "^4.6.6",
|
"@types/lodash.merge": "^4.6.7",
|
||||||
"@vuepress-plume/vuepress-plugin-baidu-tongji": "workspace:*",
|
"@vuepress-plume/vuepress-plugin-baidu-tongji": "workspace:*",
|
||||||
"@vuepress-plume/vuepress-plugin-caniuse": "workspace:*",
|
"@vuepress-plume/vuepress-plugin-caniuse": "workspace:*",
|
||||||
"@vuepress-plume/vuepress-plugin-copy-code": "workspace:*",
|
"@vuepress-plume/vuepress-plugin-copy-code": "workspace:*",
|
||||||
"@vuepress/client": "2.0.0-beta.49",
|
"@vuepress/client": "2.0.0-beta.51",
|
||||||
"@vuepress/core": "2.0.0-beta.49",
|
"@vuepress/core": "2.0.0-beta.51",
|
||||||
"@vuepress/plugin-active-header-links": "2.0.0-beta.49",
|
"@vuepress/plugin-active-header-links": "2.0.0-beta.51",
|
||||||
"@vuepress/plugin-container": "2.0.0-beta.49",
|
"@vuepress/plugin-container": "2.0.0-beta.51",
|
||||||
"@vuepress/plugin-docsearch": "2.0.0-beta.49",
|
"@vuepress/plugin-docsearch": "2.0.0-beta.51",
|
||||||
"@vuepress/plugin-external-link-icon": "2.0.0-beta.49",
|
"@vuepress/plugin-external-link-icon": "2.0.0-beta.51",
|
||||||
"@vuepress/plugin-git": "2.0.0-beta.49",
|
"@vuepress/plugin-git": "2.0.0-beta.51",
|
||||||
"@vuepress/plugin-medium-zoom": "2.0.0-beta.49",
|
"@vuepress/plugin-medium-zoom": "2.0.0-beta.51",
|
||||||
"@vuepress/plugin-nprogress": "2.0.0-beta.49",
|
"@vuepress/plugin-nprogress": "2.0.0-beta.51",
|
||||||
"@vuepress/plugin-palette": "2.0.0-beta.49",
|
"@vuepress/plugin-palette": "2.0.0-beta.51",
|
||||||
"@vuepress/plugin-prismjs": "2.0.0-beta.49",
|
"@vuepress/plugin-prismjs": "2.0.0-beta.51",
|
||||||
"@vuepress/plugin-search": "2.0.0-beta.49",
|
"@vuepress/plugin-search": "2.0.0-beta.51",
|
||||||
"@vuepress/plugin-theme-data": "2.0.0-beta.49",
|
"@vuepress/plugin-theme-data": "2.0.0-beta.51",
|
||||||
"@vuepress/plugin-toc": "2.0.0-beta.49",
|
"@vuepress/plugin-toc": "2.0.0-beta.51",
|
||||||
"@vuepress/shared": "2.0.0-beta.49",
|
"@vuepress/shared": "2.0.0-beta.51",
|
||||||
"@vuepress/utils": "2.0.0-beta.49",
|
"@vuepress/utils": "2.0.0-beta.51",
|
||||||
"@vueuse/core": "^8.2.3",
|
"@vueuse/core": "^9.3.0",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"date-fns": "^2.28.0",
|
"date-fns": "^2.29.3",
|
||||||
"gray-matter": "^4.0.3",
|
"gray-matter": "^4.0.3",
|
||||||
"json2yaml": "^1.1.0",
|
"json2yaml": "^1.1.0",
|
||||||
"lodash.merge": "^4.6.2",
|
"lodash.merge": "^4.6.2",
|
||||||
"nanoid": "^3.3.4",
|
"nanoid": "^4.0.0",
|
||||||
"sass": "^1.51.0",
|
"sass": "^1.55.0",
|
||||||
"sass-loader": "^13.0.2",
|
"sass-loader": "^13.1.0",
|
||||||
"ts-debounce": "^4.0.0",
|
"ts-debounce": "^4.0.0",
|
||||||
"vue": "^3.2.37",
|
"vue": "^3.2.41",
|
||||||
"vue-router": "4.1.2",
|
"vue-router": "4.1.5",
|
||||||
"vuepress-plugin-comment2": "2.0.0-beta.87",
|
"vuepress-plugin-comment2": "2.0.0-beta.110",
|
||||||
"vuepress-plugin-md-enhance": "2.0.0-beta.87",
|
"vuepress-plugin-md-enhance": "2.0.0-beta.110",
|
||||||
"vuepress-plugin-seo2": "2.0.0-beta.87",
|
"vuepress-plugin-seo2": "2.0.0-beta.110",
|
||||||
"vuepress-plugin-sitemap2": "2.0.0-beta.87"
|
"vuepress-plugin-sitemap2": "2.0.0-beta.110"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"sass-loader": "^13.0.2"
|
"sass-loader": "^13.0.2"
|
||||||
|
|||||||
@ -3,8 +3,8 @@ import BlogInfo from '@theme-plume/BlogInfo.vue'
|
|||||||
import DropdownTransition from '@theme-plume/DropdownTransition.vue'
|
import DropdownTransition from '@theme-plume/DropdownTransition.vue'
|
||||||
import type { PageHeader } from '@vuepress/client'
|
import type { PageHeader } from '@vuepress/client'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useArchive } from '../composables'
|
import { useArchive } from '../composables/index.js'
|
||||||
import Toc from './Toc'
|
import Toc from './Toc.js'
|
||||||
|
|
||||||
const archiveList = useArchive()
|
const archiveList = useArchive()
|
||||||
|
|
||||||
@ -14,6 +14,7 @@ const headers = computed(() => {
|
|||||||
level: 2,
|
level: 2,
|
||||||
slug: year,
|
slug: year,
|
||||||
title: year,
|
title: year,
|
||||||
|
link: '',
|
||||||
children: [],
|
children: [],
|
||||||
} as PageHeader
|
} as PageHeader
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import Sidebar from '@theme-plume/Sidebar.vue'
|
import Sidebar from '@theme-plume/Sidebar.vue'
|
||||||
import { useAsideNavbar, useNavbarConfig } from '../composables'
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
||||||
|
import type { SidebarOptions } from '../../shared/index.js'
|
||||||
|
import { useAsideNavbar, useNavbarConfig } from '../composables/index.js'
|
||||||
|
|
||||||
const navbarConfig = useNavbarConfig()
|
const navbarConfig = useNavbarConfig()
|
||||||
const { asideNavbarShow, triggerAsideNavbar } = useAsideNavbar()
|
const { asideNavbarShow, triggerAsideNavbar } = useAsideNavbar()
|
||||||
@ -12,7 +14,7 @@ const { asideNavbarShow, triggerAsideNavbar } = useAsideNavbar()
|
|||||||
class="aside-navbar-wrapper"
|
class="aside-navbar-wrapper"
|
||||||
@click.self="triggerAsideNavbar(false)"
|
@click.self="triggerAsideNavbar(false)"
|
||||||
>
|
>
|
||||||
<Sidebar :aside="navbarConfig" />
|
<Sidebar :aside="(navbarConfig as SidebarOptions)" />
|
||||||
</div>
|
</div>
|
||||||
</Transition>
|
</Transition>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import { computed, toRefs } from 'vue'
|
|||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { useSiteData } from '@vuepress/client'
|
import { useSiteData } from '@vuepress/client'
|
||||||
import type { NavLink } from '../../shared'
|
import type { NavLink } from '../../shared/index.js'
|
||||||
import { isLinkHttp, isLinkMailto, isLinkTel } from '@vuepress/shared'
|
import { isLinkHttp, isLinkMailto, isLinkTel } from '@vuepress/shared'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { debounce } from 'ts-debounce'
|
import { debounce } from 'ts-debounce'
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import { getScrollTop, scrollTo } from '../utils'
|
import { getScrollTop, scrollTo } from '../utils/index.js'
|
||||||
import { BackTopIcon } from './icons'
|
import { BackTopIcon } from './icons/index.js'
|
||||||
|
|
||||||
const opacity = ref<number>(0)
|
const opacity = ref<number>(0)
|
||||||
const MAX_TOP = 300
|
const MAX_TOP = 300
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useThemeLocaleData } from '../composables'
|
import { useThemeLocaleData } from '../composables/index.js'
|
||||||
import BloggerInfo from './BloggerInfo.vue'
|
import BloggerInfo from './BloggerInfo.vue'
|
||||||
const themeLocale = useThemeLocaleData()
|
const themeLocale = useThemeLocaleData()
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import DropdownTransition from '@theme-plume/DropdownTransition.vue'
|
|||||||
import { isLinkHttp, isLinkMailto } from '@vuepress/shared'
|
import { isLinkHttp, isLinkMailto } from '@vuepress/shared'
|
||||||
import type { FunctionalComponent, Ref } from 'vue'
|
import type { FunctionalComponent, Ref } from 'vue'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import { usePostStat, useThemeLocaleData } from '../composables'
|
import { usePostStat, useThemeLocaleData } from '../composables/index.js'
|
||||||
import {
|
import {
|
||||||
EmailIcon,
|
EmailIcon,
|
||||||
FacebookIcon,
|
FacebookIcon,
|
||||||
@ -16,7 +16,7 @@ import {
|
|||||||
TwitterIcon,
|
TwitterIcon,
|
||||||
WeiBoIcon,
|
WeiBoIcon,
|
||||||
ZhiHuIcon,
|
ZhiHuIcon,
|
||||||
} from './icons'
|
} from './icons/index.js'
|
||||||
|
|
||||||
interface SocialItem {
|
interface SocialItem {
|
||||||
url: string
|
url: string
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import BlogInfo from '@theme-plume/BlogInfo.vue'
|
import BlogInfo from '@theme-plume/BlogInfo.vue'
|
||||||
import DropdownTransition from '@theme-plume/DropdownTransition.vue'
|
import DropdownTransition from '@theme-plume/DropdownTransition.vue'
|
||||||
import { useCategoryList } from '../composables'
|
import { useCategoryList } from '../composables/index.js'
|
||||||
import CategoryGroup from './CategoryGroup.vue'
|
import CategoryGroup from './CategoryGroup.vue'
|
||||||
|
|
||||||
const categoryList = useCategoryList()
|
const categoryList = useCategoryList()
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import DropdownTransition from '@theme-plume/DropdownTransition.vue'
|
import DropdownTransition from '@theme-plume/DropdownTransition.vue'
|
||||||
import type { FunctionalComponent, PropType } from 'vue'
|
import type { FunctionalComponent, PropType } from 'vue'
|
||||||
import { h } from 'vue'
|
import { h } from 'vue'
|
||||||
import type { CategoryItem } from '../composables'
|
import type { CategoryItem } from '../composables/index.js'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
category: {
|
category: {
|
||||||
type: Object as PropType<CategoryItem>,
|
type: Object as PropType<CategoryItem>,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useDarkMode, useThemeLocaleData } from '../composables'
|
import { useDarkMode, useThemeLocaleData } from '../composables/index.js'
|
||||||
const themeLocale = useThemeLocaleData()
|
const themeLocale = useThemeLocaleData()
|
||||||
const isDarkMode = useDarkMode()
|
const isDarkMode = useDarkMode()
|
||||||
const toggleDarkMode = (): void => {
|
const toggleDarkMode = (): void => {
|
||||||
|
|||||||
@ -2,10 +2,10 @@
|
|||||||
import { usePageFrontmatter, withBase } from '@vuepress/client'
|
import { usePageFrontmatter, withBase } from '@vuepress/client'
|
||||||
import { isLinkHttp } from '@vuepress/shared'
|
import { isLinkHttp } from '@vuepress/shared'
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
import type { PlumeThemeHomeFrontmatter } from '../../shared'
|
import type { PlumeThemeHomeFrontmatter } from '../../shared/index.js'
|
||||||
import { useThemeLocaleData } from '../composables'
|
import { useThemeLocaleData } from '../composables/index.js'
|
||||||
import { scrollTo } from '../utils'
|
import { scrollTo } from '../utils/index.js'
|
||||||
import { ArrowBottomIcon } from './icons'
|
import { ArrowBottomIcon } from './icons/index.js'
|
||||||
|
|
||||||
const frontmatter = usePageFrontmatter<PlumeThemeHomeFrontmatter>()
|
const frontmatter = usePageFrontmatter<PlumeThemeHomeFrontmatter>()
|
||||||
const MOBILE_WIDTH = 716
|
const MOBILE_WIDTH = 716
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import NavbarBrand from '@theme-plume/NavbarBrand.vue'
|
|||||||
import NavbarItems from '@theme-plume/NavbarItems.vue'
|
import NavbarItems from '@theme-plume/NavbarItems.vue'
|
||||||
import ToggleSidebarButton from '@theme-plume/ToggleSidebarButton.vue'
|
import ToggleSidebarButton from '@theme-plume/ToggleSidebarButton.vue'
|
||||||
import { computed, onMounted, ref } from 'vue'
|
import { computed, onMounted, ref } from 'vue'
|
||||||
import { useAsideNavbar, useThemeLocaleData } from '../composables'
|
import { useAsideNavbar, useThemeLocaleData } from '../composables/index.js'
|
||||||
import { getCssValue } from '../utils'
|
import { getCssValue } from '../utils/index.js'
|
||||||
|
|
||||||
const themeLocale = useThemeLocaleData()
|
const themeLocale = useThemeLocaleData()
|
||||||
|
|
||||||
|
|||||||
@ -7,12 +7,12 @@ import {
|
|||||||
} from '@vuepress/client'
|
} from '@vuepress/client'
|
||||||
import { computed, h } from 'vue'
|
import { computed, h } from 'vue'
|
||||||
import type { FunctionalComponent } from 'vue'
|
import type { FunctionalComponent } from 'vue'
|
||||||
import type { NavLink } from '../../shared'
|
import type { NavLink } from '../../shared/index.js'
|
||||||
import {
|
import {
|
||||||
useDarkMode,
|
useDarkMode,
|
||||||
useSidebarIndex,
|
useSidebarIndex,
|
||||||
useThemeLocaleData,
|
useThemeLocaleData,
|
||||||
} from '../composables'
|
} from '../composables/index.js'
|
||||||
|
|
||||||
const routeLocale = useRouteLocale()
|
const routeLocale = useRouteLocale()
|
||||||
const siteLocale = useSiteLocaleData()
|
const siteLocale = useSiteLocaleData()
|
||||||
|
|||||||
@ -4,8 +4,12 @@ import DropdownTransition from '@theme-plume/DropdownTransition.vue'
|
|||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import { computed, ref, toRefs, watch } from 'vue'
|
import { computed, ref, toRefs, watch } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { NavbarItem, NavGroup } from '../../shared'
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
||||||
import type { ResolveNavbarItem } from '../../shared'
|
import type {
|
||||||
|
NavbarItem,
|
||||||
|
NavGroup,
|
||||||
|
ResolveNavbarItem,
|
||||||
|
} from '../../shared/index.js'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
@ -32,7 +36,7 @@ watch(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
const handleDropdown = (e): void => {
|
const handleDropdown = (e: MouseEvent): void => {
|
||||||
const isTriggerByTab = e.detail === 0
|
const isTriggerByTab = e.detail === 0
|
||||||
if (isTriggerByTab || props.isHeader) {
|
if (isTriggerByTab || props.isHeader) {
|
||||||
open.value = !open.value
|
open.value = !open.value
|
||||||
@ -43,7 +47,7 @@ const handleDropdown = (e): void => {
|
|||||||
const isLastItemOfArray = (item: unknown, arr: unknown[]): boolean =>
|
const isLastItemOfArray = (item: unknown, arr: unknown[]): boolean =>
|
||||||
arr[arr.length - 1] === item
|
arr[arr.length - 1] === item
|
||||||
|
|
||||||
const onSubTitleFocusout = (child): void => {
|
const onSubTitleFocusout = (child: any): void => {
|
||||||
if (
|
if (
|
||||||
isLastItemOfArray(child, item.value.children) &&
|
isLastItemOfArray(child, item.value.children) &&
|
||||||
child.children &&
|
child.children &&
|
||||||
@ -53,7 +57,7 @@ const onSubTitleFocusout = (child): void => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const onGrandChildFocusout = (grandchild, child): void => {
|
const onGrandChildFocusout = (grandchild: unknown, child: any): void => {
|
||||||
if (
|
if (
|
||||||
isLastItemOfArray(grandchild, child.children) &&
|
isLastItemOfArray(grandchild, child.children) &&
|
||||||
isLastItemOfArray(child, item.value.children)
|
isLastItemOfArray(child, item.value.children)
|
||||||
|
|||||||
@ -2,12 +2,17 @@
|
|||||||
import AutoLink from '@theme-plume/AutoLink.vue'
|
import AutoLink from '@theme-plume/AutoLink.vue'
|
||||||
import NavbarDropdown from '@theme-plume/NavbarDropdown.vue'
|
import NavbarDropdown from '@theme-plume/NavbarDropdown.vue'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import type { NavGroup, ResolveNavbarItem } from '../../shared'
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
||||||
|
import type {
|
||||||
|
NavGroup,
|
||||||
|
NavLink,
|
||||||
|
ResolveNavbarItem,
|
||||||
|
} from '../../shared/index.js'
|
||||||
import {
|
import {
|
||||||
useNavbarConfig,
|
useNavbarConfig,
|
||||||
useNavbarRepo,
|
useNavbarRepo,
|
||||||
useNavbarSelectLanguage,
|
useNavbarSelectLanguage,
|
||||||
} from '../composables'
|
} from '../composables/index.js'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
isHeader: {
|
isHeader: {
|
||||||
@ -32,10 +37,10 @@ const navbarLinks = computed(() => [
|
|||||||
<div v-for="item in navbarLinks" :key="item.text" class="navbar-item">
|
<div v-for="item in navbarLinks" :key="item.text" class="navbar-item">
|
||||||
<NavbarDropdown
|
<NavbarDropdown
|
||||||
v-if="(item as NavGroup<ResolveNavbarItem>).children"
|
v-if="(item as NavGroup<ResolveNavbarItem>).children"
|
||||||
:item="item"
|
:item="(item as NavGroup<ResolveNavbarItem>)"
|
||||||
:is-header="isHeader"
|
:is-header="isHeader"
|
||||||
/>
|
/>
|
||||||
<AutoLink v-else :item="item" />
|
<AutoLink v-else :item="(item as NavLink)" />
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -4,9 +4,9 @@ import PostMeta from '@theme-plume/PostMeta.vue'
|
|||||||
import Sidebar from '@theme-plume/Sidebar.vue'
|
import Sidebar from '@theme-plume/Sidebar.vue'
|
||||||
import { usePageData } from '@vuepress/client'
|
import { usePageData } from '@vuepress/client'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import type { PlumeThemePageData } from '../../shared'
|
import type { PlumeThemePageData } from '../../shared/index.js'
|
||||||
import { useDarkMode } from '../composables'
|
import { useDarkMode } from '../composables/index.js'
|
||||||
import Toc from './Toc'
|
import Toc from './Toc.js'
|
||||||
|
|
||||||
const page = usePageData<PlumeThemePageData>()
|
const page = usePageData<PlumeThemePageData>()
|
||||||
const isDarkMode = useDarkMode()
|
const isDarkMode = useDarkMode()
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useThemeLocaleData } from '../composables'
|
import { useThemeLocaleData } from '../composables/index.js'
|
||||||
|
|
||||||
const themeLocale = useThemeLocaleData()
|
const themeLocale = useThemeLocaleData()
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useOffsetPagination } from '@vueuse/core'
|
import { useOffsetPagination } from '@vueuse/core'
|
||||||
import { computed, ref, toRefs } from 'vue'
|
import { computed, ref, toRefs } from 'vue'
|
||||||
import { ArrowDoubleLeftIcon, ArrowDoubleRightIcon } from './icons'
|
import { ArrowDoubleLeftIcon, ArrowDoubleRightIcon } from './icons/index.js'
|
||||||
|
|
||||||
const emit = defineEmits(['togglePage'])
|
const emit = defineEmits(['togglePage'])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -16,7 +16,7 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
const { page, total } = toRefs(props)
|
const { page, total } = toRefs(props)
|
||||||
|
|
||||||
function handlePage({ currentPage }): void {
|
function handlePage({ currentPage }: { currentPage: number }): void {
|
||||||
emit('togglePage', currentPage)
|
emit('togglePage', currentPage)
|
||||||
}
|
}
|
||||||
const { currentPage, pageCount, isFirstPage, isLastPage, prev, next } =
|
const { currentPage, pageCount, isFirstPage, isLastPage, prev, next } =
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
import DropdownTransition from '@theme-plume/DropdownTransition.vue'
|
import DropdownTransition from '@theme-plume/DropdownTransition.vue'
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import type { PostItem } from '../../shared'
|
import type { PostItem } from '../../shared/index.js'
|
||||||
import AutoLink from './AutoLink.vue'
|
import AutoLink from './AutoLink.vue'
|
||||||
import { TopIcon } from './icons'
|
import { TopIcon } from './icons/index.js'
|
||||||
import PostMeta from './PostMeta.vue'
|
import PostMeta from './PostMeta.vue'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
|
|||||||
@ -5,10 +5,10 @@ import { usePageFrontmatter } from '@vuepress/client'
|
|||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import { nextTick, onMounted, toRefs, watch } from 'vue'
|
import { nextTick, onMounted, toRefs, watch } from 'vue'
|
||||||
import { onBeforeRouteUpdate, useRoute, useRouter } from 'vue-router'
|
import { onBeforeRouteUpdate, useRoute, useRouter } from 'vue-router'
|
||||||
import type { PlumeThemeHomeFrontmatter } from '../../shared'
|
import type { PlumeThemeHomeFrontmatter } from '../../shared/index.js'
|
||||||
import type { PostListData } from '../composables'
|
import type { PostListData } from '../composables/index.js'
|
||||||
import { usePostList } from '../composables'
|
import { usePostList } from '../composables/index.js'
|
||||||
import { scrollTo } from '../utils'
|
import { scrollTo } from '../utils/index.js'
|
||||||
import Pagination from './Pagination.vue'
|
import Pagination from './Pagination.vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@ -2,10 +2,10 @@
|
|||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import type { PostItem } from '../../shared'
|
import type { PostItem } from '../../shared/index.js'
|
||||||
import { useThemeLocaleData } from '../composables'
|
import { useThemeLocaleData } from '../composables/index.js'
|
||||||
import { getColor, normalizePath } from '../utils'
|
import { getColor, normalizePath } from '../utils/index.js'
|
||||||
import { ClockIcon, FolderIcon, TagIcon, UserIcon } from './icons'
|
import { ClockIcon, FolderIcon, TagIcon, UserIcon } from './icons/index.js'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
post: {
|
post: {
|
||||||
|
|||||||
@ -3,8 +3,8 @@ import SidebarItems from '@theme-plume/SidebarItems.vue'
|
|||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import { onMounted, ref, watchEffect } from 'vue'
|
import { onMounted, ref, watchEffect } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import type { SidebarOptions } from '../../shared'
|
import type { SidebarOptions } from '../../shared/index.js'
|
||||||
import { useAsideNavbar, useSidebarIndex } from '../composables'
|
import { useAsideNavbar, useSidebarIndex } from '../composables/index.js'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
aside: {
|
aside: {
|
||||||
@ -27,7 +27,10 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<aside :ref="(e) => (el = e)" class="plume-theme-sidebar-wrapper">
|
<aside
|
||||||
|
:ref="(e) => (el = e as HTMLElement)"
|
||||||
|
class="plume-theme-sidebar-wrapper"
|
||||||
|
>
|
||||||
<SidebarItems
|
<SidebarItems
|
||||||
v-if="aside.length"
|
v-if="aside.length"
|
||||||
class="aside-navbar"
|
class="aside-navbar"
|
||||||
|
|||||||
@ -2,10 +2,10 @@
|
|||||||
import AutoLink from '@theme-plume/AutoLink.vue'
|
import AutoLink from '@theme-plume/AutoLink.vue'
|
||||||
import { computed, ref, watchEffect } from 'vue'
|
import { computed, ref, watchEffect } from 'vue'
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import type { SidebarItem, SidebarOptions } from '../../shared'
|
import type { SidebarItem, SidebarOptions } from '../../shared/index.js'
|
||||||
import { useThemeLocaleData } from '../composables'
|
import { useThemeLocaleData } from '../composables/index.js'
|
||||||
import { hasOwn } from '../utils'
|
import { hasOwn } from '../utils/index.js'
|
||||||
import { ArrowRightIcon } from './icons'
|
import { ArrowRightIcon } from './icons/index.js'
|
||||||
|
|
||||||
type SidebarListComputed = SidebarItem & { open: boolean }
|
type SidebarListComputed = SidebarItem & { open: boolean }
|
||||||
|
|
||||||
|
|||||||
@ -4,9 +4,9 @@ import DropdownTransition from '@theme-plume/DropdownTransition.vue'
|
|||||||
import PostList from '@theme-plume/PostList.vue'
|
import PostList from '@theme-plume/PostList.vue'
|
||||||
import { computed, ref, watch } from 'vue'
|
import { computed, ref, watch } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import type { PostListRef } from '../composables'
|
import type { PostListRef } from '../composables/index.js'
|
||||||
import { usePostAllIndex, useTagList } from '../composables'
|
import { usePostAllIndex, useTagList } from '../composables/index.js'
|
||||||
import { normalizePath } from '../utils'
|
import { normalizePath } from '../utils/index.js'
|
||||||
|
|
||||||
const tagList = useTagList()
|
const tagList = useTagList()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import type { PropType, VNode } from 'vue'
|
|||||||
import { computed, defineComponent, h, toRefs } from 'vue'
|
import { computed, defineComponent, h, toRefs } from 'vue'
|
||||||
import type { RouteLocationNormalizedLoaded } from 'vue-router'
|
import type { RouteLocationNormalizedLoaded } from 'vue-router'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { scrollTo } from '../utils'
|
import { scrollTo } from '../utils/index.js'
|
||||||
|
|
||||||
export type TocPropsHeaders = PageHeader[]
|
export type TocPropsHeaders = PageHeader[]
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ const renderLink = (
|
|||||||
href: hash,
|
href: hash,
|
||||||
class: linkClass,
|
class: linkClass,
|
||||||
ariaLabel: header.title,
|
ariaLabel: header.title,
|
||||||
onClick: (e) => {
|
onClick: (e: MouseEvent) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
setActiveRouteHash()
|
setActiveRouteHash()
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useThemeLocaleData } from '../composables'
|
import { useThemeLocaleData } from '../composables/index.js'
|
||||||
|
|
||||||
defineEmits(['toggle'])
|
defineEmits(['toggle'])
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ const themeLocale = useThemeLocaleData()
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="toggle-sidebar-button"
|
class="toggle-sidebar-button"
|
||||||
:title="themeLocale.toggleSidebar"
|
:title="themeLocale.toggleSidebar || ''"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { h } from 'vue'
|
import { h } from 'vue'
|
||||||
import type { FunctionalComponent } from 'vue'
|
import type { FunctionalComponent } from 'vue'
|
||||||
import { IconBase } from './IconBase'
|
import { IconBase } from './IconBase.js'
|
||||||
|
|
||||||
export const UserIcon: FunctionalComponent = () =>
|
export const UserIcon: FunctionalComponent = () =>
|
||||||
h(IconBase, { name: 'user' }, () =>
|
h(IconBase, { name: 'user' }, () =>
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
export * from './IconBase'
|
export * from './IconBase.js'
|
||||||
export * from './icon'
|
export * from './icon.js'
|
||||||
export * from './socialIcon'
|
export * from './socialIcon.js'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { h } from 'vue'
|
import { h } from 'vue'
|
||||||
import type { FunctionalComponent } from 'vue'
|
import type { FunctionalComponent } from 'vue'
|
||||||
import { IconBase } from './IconBase'
|
import { IconBase } from './IconBase.js'
|
||||||
|
|
||||||
export const GithubIcon: FunctionalComponent = () =>
|
export const GithubIcon: FunctionalComponent = () =>
|
||||||
h(IconBase, { name: 'github', viewBox: '0 0 1024 1024' }, () =>
|
h(IconBase, { name: 'github', viewBox: '0 0 1024 1024' }, () =>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import type { Ref } from 'vue'
|
import type { Ref } from 'vue'
|
||||||
import { usePostAllIndex } from './postIndex'
|
import { usePostAllIndex } from './postIndex.js'
|
||||||
|
|
||||||
export interface ArchiveItem {
|
export interface ArchiveItem {
|
||||||
year: string
|
year: string
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import type { Ref } from 'vue'
|
import type { Ref } from 'vue'
|
||||||
import type { PostItem } from '../../shared'
|
import type { PostItem } from '../../shared/index.js'
|
||||||
import { usePostIndex } from './postIndex'
|
import { usePostIndex } from './postIndex.js'
|
||||||
|
|
||||||
export interface CategoryItem {
|
export interface CategoryItem {
|
||||||
label: string
|
label: string
|
||||||
@ -16,7 +16,7 @@ export type CategoryListRef = Ref<CategoryList>
|
|||||||
|
|
||||||
export const useCategoryList = (): CategoryListRef => {
|
export const useCategoryList = (): CategoryListRef => {
|
||||||
let categoryListRaw: CategoryList = []
|
let categoryListRaw: CategoryList = []
|
||||||
usePostIndex().value.forEach((post) => {
|
usePostIndex().value.forEach((post: PostItem) => {
|
||||||
if (post.category.length === 0) return
|
if (post.category.length === 0) return
|
||||||
const category = post.category.map((cate, index) => {
|
const category = post.category.map((cate, index) => {
|
||||||
if (index > 0) {
|
if (index > 0) {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { usePreferredDark, useStorage } from '@vueuse/core'
|
import { usePreferredDark, useStorage } from '@vueuse/core'
|
||||||
import { computed, inject, onMounted, onUnmounted, provide, watch } from 'vue'
|
import { computed, inject, onMounted, onUnmounted, provide, watch } from 'vue'
|
||||||
import type { InjectionKey, WritableComputedRef } from 'vue'
|
import type { InjectionKey, WritableComputedRef } from 'vue'
|
||||||
import { useThemeLocaleData } from './themeData'
|
import { useThemeLocaleData } from './themeData.js'
|
||||||
|
|
||||||
export type DarkModeRef = WritableComputedRef<boolean>
|
export type DarkModeRef = WritableComputedRef<boolean>
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
export * from './themeData'
|
export * from './themeData.js'
|
||||||
export * from './darkMode'
|
export * from './darkMode.js'
|
||||||
export * from './navbar'
|
export * from './navbar.js'
|
||||||
export * from './navLink'
|
export * from './navLink.js'
|
||||||
export * from './resolveRouteWithRedirect'
|
export * from './resolveRouteWithRedirect.js'
|
||||||
|
|
||||||
export * from './postIndex'
|
export * from './postIndex.js'
|
||||||
export * from './sidebarIndex'
|
export * from './sidebarIndex.js'
|
||||||
export * from './postList'
|
export * from './postList.js'
|
||||||
export * from './scrollPromise'
|
export * from './scrollPromise.js'
|
||||||
export * from './asideNavbar'
|
export * from './asideNavbar.js'
|
||||||
export * from './postStat'
|
export * from './postStat.js'
|
||||||
|
|
||||||
export * from './tag'
|
export * from './tag.js'
|
||||||
export * from './category'
|
export * from './category.js'
|
||||||
export * from './archive'
|
export * from './archive.js'
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { NavLink } from '../../shared'
|
import type { NavLink } from '../../shared/index.js'
|
||||||
import { useResolveRouteWithRedirect } from './resolveRouteWithRedirect'
|
import { useResolveRouteWithRedirect } from './resolveRouteWithRedirect.js'
|
||||||
|
|
||||||
declare module 'vue-router' {
|
declare module 'vue-router' {
|
||||||
interface RouteMeta {
|
interface RouteMeta {
|
||||||
|
|||||||
@ -8,10 +8,10 @@ import type {
|
|||||||
NavbarItem,
|
NavbarItem,
|
||||||
NavLink,
|
NavLink,
|
||||||
ResolveNavbarItem,
|
ResolveNavbarItem,
|
||||||
} from '../../shared'
|
} from '../../shared/index.js'
|
||||||
import { resolveRepoType } from '../utils'
|
import { resolveRepoType } from '../utils/index.js'
|
||||||
import { useNavLink } from './navLink'
|
import { useNavLink } from './navLink.js'
|
||||||
import { useThemeLocaleData } from './themeData'
|
import { useThemeLocaleData } from './themeData.js'
|
||||||
|
|
||||||
export const useNavbarSelectLanguage = (): ComputedRef<ResolveNavbarItem[]> => {
|
export const useNavbarSelectLanguage = (): ComputedRef<ResolveNavbarItem[]> => {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { postIndex as postIndexRaw } from '@internal/postIndex.js'
|
import { postIndex as postIndexRaw } from '@internal/postIndex.js'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import type { Ref } from 'vue'
|
import type { Ref } from 'vue'
|
||||||
import type { PostIndex } from '../../shared'
|
import type { PostIndex } from '../../shared/index.js'
|
||||||
|
|
||||||
const isBoolean = (arg: unknown): boolean => {
|
const isBoolean = (arg: unknown): boolean => {
|
||||||
return typeof arg === 'boolean'
|
return typeof arg === 'boolean'
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import type { Ref } from 'vue'
|
import type { Ref } from 'vue'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import type { PostItem } from '../../shared'
|
import type { PostItem } from '../../shared/index.js'
|
||||||
import { usePostIndex } from './postIndex'
|
import { usePostIndex } from './postIndex.js'
|
||||||
|
|
||||||
export type PostListData = PostItem[]
|
export type PostListData = PostItem[]
|
||||||
export type PostListRef = Ref<PostListData>
|
export type PostListRef = Ref<PostListData>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { reactive } from 'vue'
|
import { reactive } from 'vue'
|
||||||
import { usePostAllIndex } from './postIndex'
|
import { usePostAllIndex } from './postIndex.js'
|
||||||
import { useTagList } from './tag'
|
import { useTagList } from './tag.js'
|
||||||
|
|
||||||
export interface PostStatData {
|
export interface PostStatData {
|
||||||
postTotal: number
|
postTotal: number
|
||||||
|
|||||||
@ -3,8 +3,8 @@ import { usePageFrontmatter } from '@vuepress/client'
|
|||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import type { ComputedRef, Ref } from 'vue'
|
import type { ComputedRef, Ref } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import type { SidebarOptions } from '../../shared'
|
import type { SidebarOptions } from '../../shared/index.js'
|
||||||
import { useThemeLocaleData } from './themeData'
|
import { useThemeLocaleData } from './themeData.js'
|
||||||
|
|
||||||
export type SidebarIndexRef = Ref<Record<string, SidebarOptions>>
|
export type SidebarIndexRef = Ref<Record<string, SidebarOptions>>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import type { Ref } from 'vue'
|
import type { Ref } from 'vue'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { getColor } from '../utils'
|
import { getColor } from '../utils/index.js'
|
||||||
import { usePostAllIndex } from './postIndex'
|
import { usePostAllIndex } from './postIndex.js'
|
||||||
|
|
||||||
export interface TagItem {
|
export interface TagItem {
|
||||||
tag: string
|
tag: string
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user