FuelLabs / sway

🌴 Empowering everyone to build reliable and efficient smart contracts.
https://docs.fuel.network/docs/sway/
Apache License 2.0
62.79k stars 5.36k forks source link

`mdbook-forc-documenter`: support documentation for native plugins #1295

Closed eightfilms closed 2 years ago

eightfilms commented 2 years ago

Related discussions about forc --list: https://github.com/FuelLabs/sway/pull/1047#discussion_r846969076 https://github.com/FuelLabs/sway/issues/702

Currently, forc-documenter uses forc --help to generate documentation for forc commands. When/if we have forc --list ready to support listing forc commands + forc plugins, we should use that instead.

mitchmindtree commented 2 years ago

Thinking on this more, perhaps it is better to use two distinct commands for documenting commands and plugins separately?

E.g. command reference goes under the commands chapter, and then we can add a similar reference for the plugins we ship (i.e. forc-fmt, forc-lsp) under the plugins chapter.

Keeping in mind the mdbook publishing CI would need to be updated to first install each of the plugins so that they're available to the forc plugins command.

eightfilms commented 2 years ago

Yup, definitely makes sense regarding the documentation. In that case perhaps a more appropriate name for this issue is mdbook-forc-documenter: support documentation for native plugins