Reputation: 1
I used to generate markdown docs for my project with dartdoc 5.1.2 However,I find that there is no command or option to generate markdown docs when I update my dartdoc to version 6.1.2
I have tried these commands:
dart doc --format md
dart doc --format=md
dart doc . -- formar md
but get this error:
Could not find an option named "format".
Upvotes: 0
Views: 656
Reputation: 205
I think you are confusing dart doc with dartdoc. dart doc is this tool that comes with the dart and flutter on your machine, https://dart.dev/tools/dart-doc you might be missing path to the dart binary in the env variables. It generates html and there is no way to change the format. On the other hand there is a package called dartdoc https://pub.dev/packages/dartdoc which is installable cli tool dart pub global activate dartdoc It can generate docs in markdown and html and has a bunch of other arguments that you can pass. You can also use yaml file to customize the output. It works fine on 6.2.2, just checked. I don't have FLUTTER_ROOT in my env variables. so it must be the missing oath to dart, by default it is not exposed, you must add something like C:\flutter\bin\cache\dart-sdk\bin to Path env variable, isntall how it is shown in the pub.dev package page and run dartdoc --format md
Upvotes: 2