vuepress-plugin-typedoc
Advanced tools
Comparing version 0.10.1 to 0.10.2
import { PluginOptions } from './types'; | ||
export declare const typedocPlugin: (opts: PluginOptions, ctx: any) => { | ||
name: string; | ||
ready(): Promise<void>; | ||
enhanceAppFiles(): Promise<{ | ||
@@ -8,2 +9,2 @@ name: string; | ||
} | undefined>; | ||
} | undefined; | ||
}; |
@@ -33,25 +33,27 @@ "use strict"; | ||
const options = (0, options_1.getOptions)(opts); | ||
const outputDirectory = (ctx.sourceDir || ctx.dir.source()) + '/' + options.out; | ||
(0, render_1.removeDir)(outputDirectory); | ||
app = new typedoc_1.Application(); | ||
(0, typedoc_plugin_markdown_1.load)(app); | ||
(0, options_1.addOptions)(app); | ||
app.renderer.render = render_1.render; | ||
app.bootstrap({ ...options, theme: path.resolve(__dirname) }); | ||
project = app.convert(); | ||
if (!project) { | ||
return; | ||
} | ||
if (options.watch) { | ||
app.convertAndWatch(async (project) => { | ||
app.generateDocs(project, outputDirectory); | ||
}); | ||
} | ||
else { | ||
app.generateDocs(project, outputDirectory); | ||
} | ||
return { | ||
name: 'vuepress-plugin-typedoc', | ||
async ready() { | ||
const outputDirectory = (ctx.sourceDir || ctx.dir.source()) + '/' + options.out; | ||
(0, render_1.removeDir)(outputDirectory); | ||
app = new typedoc_1.Application(); | ||
(0, typedoc_plugin_markdown_1.load)(app); | ||
(0, options_1.addOptions)(app); | ||
app.renderer.render = render_1.render; | ||
app.bootstrap(options); | ||
project = app.convert(); | ||
if (!project) { | ||
return; | ||
} | ||
if (options.watch) { | ||
app.convertAndWatch(async (project) => { | ||
await app.generateDocs(project, outputDirectory); | ||
}); | ||
} | ||
else { | ||
await app.generateDocs(project, outputDirectory); | ||
} | ||
}, | ||
async enhanceAppFiles() { | ||
if (!options.sidebar) { | ||
if (!app || !options.sidebar) { | ||
return; | ||
@@ -58,0 +60,0 @@ } |
@@ -27,2 +27,5 @@ "use strict"; | ||
var _a; | ||
if (!this.prepareTheme()) { | ||
return; | ||
} | ||
const output = new typedoc_1.RendererEvent(typedoc_1.RendererEvent.BEGIN, outputDirectory, project); | ||
@@ -29,0 +32,0 @@ output.urls = this.theme.getUrls(project); |
{ | ||
"name": "vuepress-plugin-typedoc", | ||
"version": "0.10.1", | ||
"version": "0.10.2", | ||
"description": "A VuePress plugin to build api documentation with TypeDoc.", | ||
@@ -20,3 +20,3 @@ "main": "dist/index.js", | ||
"typedoc": ">=0.22.0", | ||
"typedoc-plugin-markdown": ">=3.11.0" | ||
"typedoc-plugin-markdown": ">=3.11.10" | ||
}, | ||
@@ -41,3 +41,3 @@ "scripts": { | ||
], | ||
"gitHead": "6ef372ff56953615d2ea28352a5c2ba28203d186" | ||
"gitHead": "7a9b045eaacfdafd14c3427379d410c45f6b990b" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17814
326