Skip to content

Commit

Permalink
Merge pull request #296 from bra1nDump/master
Browse files Browse the repository at this point in the history
Fixed ignored plugin option cleanOutputDir
  • Loading branch information
tgreyuk committed Feb 24, 2022
2 parents 33a289e + 8ffc4d2 commit c214012
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-typedoc/package.json
@@ -1,6 +1,6 @@
{
"name": "docusaurus-plugin-typedoc",
"version": "0.17.0",
"version": "0.17.1",
"description": "A Docusaurus v2 plugin to build API documentation with TypeDoc.",
"main": "dist/index.js",
"files": [
Expand Down
1 change: 1 addition & 0 deletions packages/docusaurus-plugin-typedoc/src/options.ts
Expand Up @@ -4,6 +4,7 @@ const DEFAULT_PLUGIN_OPTIONS: PluginOptions = {
id: 'default',
docsRoot: 'docs',
out: 'api',
cleanOutputDir: true,
sidebar: {
fullNames: false,
categoryLabel: 'API',
Expand Down
4 changes: 3 additions & 1 deletion packages/docusaurus-plugin-typedoc/src/plugin.ts
Expand Up @@ -27,7 +27,9 @@ export default function pluginDocusaurus(

const outputDir = path.resolve(siteDir, options.docsRoot, options.out);

removeDir(outputDir);
if (opts.cleanOutputDir) {
removeDir(outputDir);
}

const app = new Application();

Expand Down
1 change: 1 addition & 0 deletions packages/docusaurus-plugin-typedoc/src/types.ts
Expand Up @@ -8,6 +8,7 @@ export interface PluginOptions {
plugin: string[];
readme?: string;
disableOutputCheck?: boolean;
cleanOutputDir?: boolean;
entryPoints?: string[];
watch: boolean;
hideInPageTOC: boolean;
Expand Down
Expand Up @@ -18,6 +18,7 @@ Array [

exports[`Options: should return default options 1`] = `
Object {
"cleanOutputDir": true,
"docsRoot": "docs",
"entryDocument": "index.md",
"entryPoints": Array [
Expand Down

0 comments on commit c214012

Please sign in to comment.