docs: create typedoc theme and plugins for references (#5297)
* update typedoc and its plugins * refactor existing typedoc configurations * added new typedoc plugin and themes * added more customization options * added more customization options * refactored doc-utils to a workspace * fix tsconfig * update README files * remove comments * revert type changes * remove dependencies no longer needed * removed modules action
This commit is contained in:
25
docs-util/packages/scripts/generate-reference.ts
Normal file
25
docs-util/packages/scripts/generate-reference.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env node
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
import { exec } from "child_process"
|
||||
|
||||
const referenceNames = process.argv.slice(2)
|
||||
referenceNames.forEach((names) => {
|
||||
const configPathName = path.join(
|
||||
__dirname,
|
||||
"..",
|
||||
"typedoc-config",
|
||||
`${names}.js`
|
||||
)
|
||||
|
||||
// check if the config file exists
|
||||
if (!fs.existsSync(configPathName)) {
|
||||
throw new Error(
|
||||
`Config file for ${names} doesn't exist. Make sure to create it in ${configPathName}`
|
||||
)
|
||||
}
|
||||
|
||||
const typedocProcess = exec(`typedoc --options ${configPathName}`)
|
||||
typedocProcess.stdout?.pipe(process.stdout)
|
||||
typedocProcess.stderr?.pipe(process.stdout)
|
||||
})
|
||||
Reference in New Issue
Block a user