docs: update typedocs config to support new module structure

This commit is contained in:
braks
2022-10-08 23:25:34 +02:00
committed by Braks
parent c1bcc02797
commit afb3fc7b49
8 changed files with 47 additions and 53 deletions
+4 -3
View File
@@ -10,16 +10,16 @@
"typedoc": "typedoc --options ./typedoc.json"
},
"dependencies": {
"vue": "^3.2.37",
"@algolia/client-search": "^4.14.2",
"@animxyz/core": "^0.6.6",
"@animxyz/vue3": "^0.6.7",
"@stackblitz/sdk": "^1.8.0",
"@vue-flow/additional-components": "workspace:*",
"@vue-flow/core": "workspace:*",
"@stackblitz/sdk": "^1.8.0",
"@vue/repl": "1.1.2",
"blobity": "^0.2.1",
"canvas-confetti": "^1.5.1"
"canvas-confetti": "^1.5.1",
"vue": "^3.2.37"
},
"devDependencies": {
"@iconify/json": "^2.1.95",
@@ -30,6 +30,7 @@
"ohmyfetch": "^0.4.18",
"typedoc": "^0.22.18",
"typedoc-plugin-markdown": "^3.13.4",
"typedoc-plugin-merge-modules": "^4.0.1",
"unplugin-auto-import": "^0.10.3",
"unplugin-icons": "^0.14.8",
"unplugin-vue-components": "^0.21.2",
+11 -15
View File
@@ -2,19 +2,6 @@ import { existsSync, readFileSync } from 'fs'
import { resolve } from 'path'
import type { Plugin } from 'vite'
const copyFile = (path: string, pkgName: string) => {
const filePath = resolve(__dirname, `${path}/${pkgName}`)
if (!existsSync(filePath)) {
throw new Error(`${pkgName} not built. ` + `Run "pnpm -w build" first.`)
}
;(this as any).emitFile({
type: 'asset',
fileName: pkgName,
source: readFileSync(filePath, 'utf-8'),
})
}
export function copyVueFlowPlugin(): Plugin {
return {
name: 'copy-vue-flow',
@@ -22,8 +9,17 @@ export function copyVueFlowPlugin(): Plugin {
;[
{ path: '../../node_modules/@vue-flow/core/dist/', pkgName: 'vue-flow.es.js' },
{ path: '../../node_modules/@vue-flow/additional-components/dist/', pkgName: 'additional-components.es.js' },
].forEach((pkg) => {
copyFile.call(this, pkg.path, pkg.pkgName)
].forEach(({ path, pkgName }) => {
const filePath = resolve(__dirname, `${path}/${pkgName}`)
if (!existsSync(filePath)) {
throw new Error(`${pkgName} not built. ` + `Run "pnpm -w build" first.`)
}
;(this as any).emitFile({
type: 'asset',
fileName: pkgName,
source: readFileSync(filePath, 'utf-8'),
})
})
},
}
@@ -13,16 +13,10 @@
"noUnusedLocals": false,
"strictNullChecks": true,
"forceConsistentCasingInFileNames": true,
"types": ["vite/client"],
"jsx": "preserve",
"paths": {
"~/*": ["src/*"]
},
"plugins": [
// Transform paths in output .d.ts files (Include this line if you output declarations files)
{ "transform": "typescript-transform-paths", "afterDeclarations": true }
]
"~/*": ["../packages/vue-flow/src/*"]
}
},
"include": ["dist", "src"],
"include": ["../packages/vue-flow", "../packages/additional-components"],
"exclude": ["node_modules"]
}
+5 -3
View File
@@ -1,14 +1,16 @@
{
"$schema": "https://typedoc.org/schema.json",
"readme": "none",
"plugin": "typedoc-plugin-markdown",
"entryPoints": ["../packages/vue-flow/src/index.ts"],
"plugin": ["typedoc-plugin-merge-modules","typedoc-plugin-markdown"],
"entryPoints": ["../packages/vue-flow/src/index.ts", "../packages/additional-components/src/index.ts"],
"allReflectionsHaveOwnDocument": true,
"categorizeByGroup": true,
"darkHighlightTheme": "vitesse-dark",
"lightHighlightTheme": "vitesse-light",
"hideBreadcrumbs": true,
"disableSources": true,
"cleanOutputDir": true,
"out": "src/typedocs",
"tsconfig": "../packages/vue-flow/tsconfig.docs.json",
"tsconfig": "./tsconfig.docs.json",
"entryDocument": "index.md"
}
+4 -4
View File
@@ -12,11 +12,11 @@
"bugs": {
"url": "https://github.com/bcakmakoglu/vue-flow/issues"
},
"main": "./dist/vue-flow-additional-components.cjs.js",
"module": "./dist/vue-flow-additional-components.es.js",
"main": "./dist/additional-components.cjs.js",
"module": "./dist/additional-components.es.js",
"types": "./dist/index.d.ts",
"unpkg": "./dist/vue-flow-additional-components.iife.js",
"jsdelivr": "./dist/vue-flow-additional-components.iife.js",
"unpkg": "./dist/additional-components.iife.js",
"jsdelivr": "./dist/additional-components.iife.js",
"files": [
"dist"
],
@@ -1,3 +1,8 @@
/**
* Additional components
* @module additional-components
*/
export * from './background'
export * from './controls'
export * from './minimap'
+5
View File
@@ -1,3 +1,8 @@
/**
* Vue Flow
* @module vue-flow
*/
export { default as VueFlow } from './container/VueFlow/VueFlow.vue'
export { default as Handle } from './components/Handle/Handle.vue'
+10 -19
View File
@@ -45,6 +45,7 @@ importers:
ohmyfetch: ^0.4.18
typedoc: ^0.22.18
typedoc-plugin-markdown: ^3.13.4
typedoc-plugin-merge-modules: ^4.0.1
unplugin-auto-import: ^0.10.3
unplugin-icons: ^0.14.8
unplugin-vue-components: ^0.21.2
@@ -72,6 +73,7 @@ importers:
ohmyfetch: 0.4.18
typedoc: 0.22.18_typescript@4.7.4
typedoc-plugin-markdown: 3.13.4_typedoc@0.22.18
typedoc-plugin-merge-modules: 4.0.1_typedoc@0.22.18
unplugin-auto-import: 0.10.3_vite@2.9.15
unplugin-icons: 0.14.8_vite@2.9.15
unplugin-vue-components: 0.21.2_vite@2.9.15+vue@3.2.37
@@ -178,25 +180,6 @@ importers:
vite-svg-loader: 3.6.0
vue-tsc: 0.40.13_typescript@4.8.4
packages/example-pkg:
specifiers:
'@vitejs/plugin-vue': ^2.3.4
'@vue-flow/core': workspace:*
unplugin-auto-import: ^0.11.2
vite: ^2.9.15
vite-plugin-vue-type-imports: 0.2.0
vue: ^3.2.37
vue-tsc: ^0.40.13
dependencies:
vue: 3.2.40
devDependencies:
'@vitejs/plugin-vue': 2.3.4_vite@2.9.15+vue@3.2.40
'@vue-flow/core': link:../vue-flow
unplugin-auto-import: 0.11.2_vite@2.9.15
vite: 2.9.15
vite-plugin-vue-type-imports: 0.2.0_s5ljmfbyjcorxzsah2scwznsai
vue-tsc: 0.40.13_typescript@4.8.4
packages/pathfinding-edge:
specifiers:
'@types/pathfinding': ^0.0.5
@@ -10805,6 +10788,14 @@ packages:
typedoc: 0.22.18_typescript@4.7.4
dev: true
/typedoc-plugin-merge-modules/4.0.1_typedoc@0.22.18:
resolution: {integrity: sha512-peuoWT/xcpEO71kNuaTBAS2IVwc8qm5tiIXnJc0vW/Cy9HHoVGkYecarkwtLBl5VmrhZjZN6LQNriqYfgHA1+A==}
peerDependencies:
typedoc: 0.23.x
dependencies:
typedoc: 0.22.18_typescript@4.7.4
dev: true
/typedoc/0.22.18_typescript@4.7.4:
resolution: {integrity: sha512-NK9RlLhRUGMvc6Rw5USEYgT4DVAUFk7IF7Q6MYfpJ88KnTZP7EneEa4RcP+tX1auAcz7QT1Iy0bUSZBYYHdoyA==}
engines: {node: '>= 12.10.0'}