add typedoc
This commit is contained in:
@@ -1,7 +1,45 @@
|
||||
const path = require('path')
|
||||
const globby = require('globby')
|
||||
const TypeDoc = require('typedoc')
|
||||
|
||||
module.exports = function (api) {
|
||||
|
||||
// api.loadSource(({ addCollection }) => {
|
||||
// const appCollection = addCollection({ typeName: 'Package' })
|
||||
|
||||
// globby.sync('../packages/*', { onlyDirectories: true })
|
||||
// .map(name => name.replace('../packages/', ''))
|
||||
// .filter(name => name.startsWith('core'))
|
||||
// .forEach(name => {
|
||||
// const app = new TypeDoc.Application()
|
||||
|
||||
// app.options.addReader(new TypeDoc.TSConfigReader())
|
||||
// app.options.addReader(new TypeDoc.TypeDocReader())
|
||||
// app.bootstrap({
|
||||
// ignoreCompilerErrors: true,
|
||||
// experimentalDecorators: true,
|
||||
// excludeExternals: true,
|
||||
// excludeNotExported: true,
|
||||
// excludeProtected: true,
|
||||
// excludePrivate: true,
|
||||
// // excludeNotDocumented: true,
|
||||
// exclude: [
|
||||
// "**/*.test.ts",
|
||||
// "**/__tests__/*",
|
||||
// "**/__mocks__/*"
|
||||
// ],
|
||||
// })
|
||||
|
||||
// const project = app.convert(app.expandInputFiles([`../packages/${name}`]))
|
||||
|
||||
// if (project) {
|
||||
// app.generateJson(project, `api/${name}.json`)
|
||||
// const json = app.serializer.projectToObject(project)
|
||||
// appCollection.addNode(json)
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
|
||||
api.chainWebpack(config => {
|
||||
config.resolve.extensions
|
||||
.add('.ts')
|
||||
|
||||
Reference in New Issue
Block a user