Files
medusa-store/docs-util/packages/scripts/generate-reference.ts
Shahed Nasser 0350eeb0a1 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
2023-10-05 12:09:42 +03:00

26 lines
654 B
JavaScript

#!/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)
})