Here's a question I'm embarrassed to not have aske...
# plugins
w
Here's a question I'm embarrassed to not have asked earlier - is there a plugin (or what would be the appropriate goal) for generating documentation from source + markdown files? Let's say Python for now, but any language overall. I'm guessing it'd be a
./pants package
?
Or maybe
./pants export-codegen
?
h
Hm I can't find a thread from last month about this. But, yes, I personally think that package makes the most sense. You could use export Codegen, but it seems that often with documentation you want to create a publishable artifact(s)
w
Yep, that's what I was thinking too - but then I read this line:
Copy code
Pants will not actually write the generated files to disk, except when running ./pants export-codegen. Instead, any targets that depend on the protocol targets will cause their code to be generated, and those generated files will be copied over into the "chroot" (temporary directory) where Pants executes.
So I started questioning if this was the correct route, even though it feels odd.
Running as a package does feel like it makes more sense, though. I would view running docs and exporting a project + docs as a "package" of work
👍 1
h
I would only use codegen if other parts of your build depend on the generated files. And even then, you can have a package depend on a package (as you well know hehe)
👍 1