TypeStrong / typedoc

Documentation generator for TypeScript projects.
https://typedoc.org
Apache License 2.0
7.73k stars 699 forks source link

Write list of found plugins and exit #659

Closed dtgriscom closed 6 years ago

dtgriscom commented 6 years ago

I'm working with typedoc and plugins, and I'm uncertain that I've installed the plugins correctly. I also would like to be able to test that a given plugin is installed, so that I can have fellow developers ensure that their environment is correctly set up.

How about adding a --listPlugins option? It would emit the list of found plugins and then exit, and wouldn't require a project name on the command line. Then I could write a shell script that would a) confirm that typedoc was installed, and b) confirm that all required plugins are installed.

aciccarello commented 6 years ago

Does npm ls typedoc-plugin-name cover your use case? You might need the --dev or --global flags depending on how it's installed. That won't necessarily list all of the plugins but you can check that the plugin has been installed.

FYI Plugins are currently identified by the existance of a typedocplugin keyword in their package.json.

aciccarello commented 6 years ago

Looking at the code more, I believe any loaded plugins are already logged to the console with the text loaded plugin ___.

https://github.com/TypeStrong/typedoc/blob/3581d04f8d62d76897fb3f9732bdf6cbfc33c731/src/lib/utils/plugins.ts#L25-L59

I'm closing but feel free to ask any follow-up questions.