When I launch the command dartdoc --auto-include-dependencies, how can I do to not create documentation for every single library in the project? I use Melos in my project.
How to not add every library inside Flutter project with Dartdoc
757 Views Asked by Alessandro Antonio Del Gaudio At
2
There are 2 best solutions below
0
On
As of dartdoc 0.35.0 you can define nodoc as option and pass array of path of dart files with wild card *.dart in dartdoc_options.yaml. This will treat those files marked as ///@nodoc. Basically saves us writing ///@nodoc in required files
Example:
dartdoc:
nodoc: [ 'lib/utils/*.dart','lib/views/**/*.dart','lib/constants/*.dart' ]
Download file from here
Take a closer look at the documentation of the dartdoc package on pub.dev. Here is the link.
If you want to exclude single libraries (specific .dart files) you can use the
@nodocnotation, which will be recognized by the package. For excluding entire folders you can move them in the directorylib/src, then the libraries will not be documented, see this.