etiennebacher / altdoc

Alternative to pkgdown to document R packages
https://altdoc.etiennebacher.com
Other
65 stars 9 forks source link

Reduce dependencies #64

Closed vincentarelbundock closed 10 months ago

vincentarelbundock commented 10 months ago

Would you let me try to reduce the number of dependencies?

Some of the could be Suggests with a conditional check. Others are called only once or twice and could easily be executed in base R.

etiennebacher commented 10 months ago

Absolutely, go ahead.

I just want to point out that this is supposed to be a package for development so I don't think it matters too much if there are many dependencies since it should be installed in a single CI workflow. But if it's not too much work it's always better to have less deps

etiennebacher commented 10 months ago

Just out of curiosity, which dependencies do you think could be easily replaced? jsonlite is used only once but is so convenient and light that I don't think it's worth removing, and many other packages are installed by other deps anyway (like cli or desc)

vincentarelbundock commented 10 months ago

I'll open a separate issue about this, but I think preview should be FALSE by default, because it is an "invasive" option (opening a new window), and because it doesn't work on some setups (like mine). If we move in that direction, servr and rstudioapi can be Suggests and we can prompt users to install them. FWIW, I never use altdoc::preview() myself, because I don't use Rstudio and I just run the built-in webserver extension of vscode.

If the path change works, we don't need here

Some dependencies are only used for one of the output formats. For example, there's a docute-only dep that could be made Suggests with a prompt.

I'd argue that we probably don't need usethis

I haven't looked at the other ones carefully yet, but will eventually.