You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a configuration file to store my TypeDoc settings. This configuration file contains the list of plugins to use, but they are not called at all. I don't want to rely on NPM auto-discovery.
Typedoc should use plugin array provided in the configuration file, and eventually merge it with the one provided by CLI arguments
Actual Behavior
Typedoc does not use the plugin option from the config file, and uses only NPM auto-discovery or the --plugin CLI argument
Steps to reproduce the bug
Install any typedoc plugin. From the installed plugin, remove the keyword typedocplugin from the keywords of the installed package.json, thus disabling npm auto-discovery.
So is it intentional that options are parsed after plugins load ?
Edit : after further checks, I saw that options declared by the plugin are not provided to it if I apply the solution mentioned above. So, maybe options should be parsed once before plugins load, stored somewhere as raw options, then use those raw options when a plugin declares them.
The text was updated successfully, but these errors were encountered:
Thank you for the detailed report! It informed my solution to the problem.
So, maybe options should be parsed once before plugins load, stored somewhere as raw options, then use those raw options when a plugin declares them.
This doesn't quite work, because we'd have to guess what type the options should be stored as. What does work though is parsing options, loading plugins, throwing away the parsed options, and re-parsing options :)
Uh oh!
There was an error while loading. Please reload this page.
I'm using a configuration file to store my TypeDoc settings. This configuration file contains the list of plugins to use, but they are not called at all. I don't want to rely on NPM auto-discovery.
This issue may be somehow related to #875.
Expected Behavior
Typedoc should use
plugin
array provided in the configuration file, and eventually merge it with the one provided by CLI argumentsActual Behavior
Typedoc does not use the
plugin
option from the config file, and uses only NPM auto-discovery or the--plugin
CLI argumentSteps to reproduce the bug
Install any typedoc plugin. From the installed plugin, remove the keyword
typedocplugin
from the keywords of the installedpackage.json
, thus disabling npm auto-discovery.Create a
typedoc.json
fileRun typedoc:
Environment
What I've tried
As far as I've seen and experimented, the problem is here:
typedoc/src/lib/application.ts
Lines 124 to 125 in 9a76bec
If I replace those lines with the following, the plugin is called correctly, but I didn't checked for side effects:
So is it intentional that options are parsed after plugins load ?
Edit : after further checks, I saw that options declared by the plugin are not provided to it if I apply the solution mentioned above. So, maybe options should be parsed once before plugins load, stored somewhere as raw options, then use those raw options when a plugin declares them.
The text was updated successfully, but these errors were encountered: