Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VuePress v2 config not working (no output) #313

Closed
tohagan opened this issue May 23, 2022 · 6 comments
Closed

VuePress v2 config not working (no output) #313

tohagan opened this issue May 23, 2022 · 6 comments

Comments

@tohagan
Copy link

tohagan commented May 23, 2022

I'm attempting to get this nice plugin to work for VuePress v2.

When I use the config you've documented, VuePress v2 emits a warning on startup that its ignored an "anonymous" plugin.
The actual message was: "an anonymous plugin or theme was detected and ignored"

plugins: [
  [
    'vuepress-plugin-typedoc',
    {
      entryPoints: ['../src/index.ts'],
      tsconfig: '../tsconfig.json'
    },
  ],
]

I noticed that many of the other v2 plugins use a "name" property on an object .. so I tried using

plugins: [
  {
    name: 'vuepress-plugin-typedoc',

    // Plugin / TypeDoc options
    {
      entryPoints: ['../src/index.ts'],
      tsconfig: '../tsconfig.json'
    },
  }
]

... and also ...

plugins: [
  {
    name: 'vuepress-plugin-typedoc',
    entryPoints: ['../src/index.ts'],
    tsconfig: '../tsconfig.json'
  }
]

Both of these removed the warning ... but alas still nothing was generated !

So I wondered if perhaps you could update your documentation to show the correct config for both VuePress v1 and v2.
Any other clues about how I could debug / diagnose the fault if one of these configs are correct.

My package.json contains ...

  "devDependencies": {
    "vuepress": "^2.0.0-beta.43"
  },
  "dependencies": {
    "markdown-it-plantuml": "^1.4.1",
    "typedoc": "^0.22.15",
    "typedoc-plugin-markdown": "^3.12.1",
    "vuepress-plugin-typedoc": "^0.10.3"
  }
@tgreyuk
Copy link
Member

tgreyuk commented May 23, 2022

thanks for this - having looked into it seems a new plugin definition is going to be required for v2.

@tohagan
Copy link
Author

tohagan commented May 24, 2022

ok cool ! I'll be looking forward to this very much.

@sleiphur
Copy link

sleiphur commented Jun 8, 2022

after upgrade vuepress to version 2.0.0-beta.46,
plugin configuration now gave me some errors:

image

TS2322: Type 'string' is not assignable to type 'Plugin'.
TS2322: Type '{ entryPoints: string[]; tsconfig: string; out: string; sidebar: { fullNames: true; parentCategory: string; }; }' is not assignable to type 'Plugin'.   Object literal may only specify known properties, and 'entryPoints' does not exist in type 'Plugin'.

my package.json like this:
"devDependencies": {
"vuepress": "^2.0.0-beta.46",
"vuepress-plugin-typedoc": "^0.10.3",
"typedoc": "^0.22.12",
"typedoc-plugin-markdown": "^3.11.14"
}

@lslzl3000
Copy link

looking forward this plugin for VuePress v2

@tgreyuk
Copy link
Member

tgreyuk commented Jul 25, 2022

@tohagan apologies for delay in getting this out - VuePress v2 support added in vuepress-plugin-typedoc@0.11.0

import { defaultTheme } from 'vuepress';
import { typedocPlugin } from 'vuepress-plugin-typedoc/next';

module.exports = {
  theme: defaultTheme({}),
  plugins: [
    typedocPlugin({
      // plugin options
      entryPoints: ['../src/index.ts'],
      tsconfig: '../tsconfig.json',
    }),
  ],
};

@tohagan
Copy link
Author

tohagan commented Jul 26, 2022

Thank you very much!! Greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants