I am writing an R package called slidify which makes it easy to generate reproducible HTML5 slides from R Markdown files. The package makes use of css and js files from several existing HTML5 slide generation frameworks like dzslides, deck.js etc. Currently, I have organized the downloaded versions of these external assets in the inst/libraries folder of slidify, so that it is automatically available for users upon installation. While this approach is simple, there are some disadvantages:
-
These frameworks are constantly updated on
github. Under the current setup, I would have to push a new version of the package everytime any of these frameworks are updated. -
If I make any tweaks to the default
cssandjsthat come with these frameworks, then I need to merge the updates carefully so that I don’t loseslidifyspecific customizations.
I had a couple of thoughts on how to manage this.
-
Don’t package these libraries with
slidify. Instead, provide afunctionthat would allow users to add the frameworks they desire. -
Add these frameworks to the
inst\librariesfolder onslidify, but assubmodules. Now, I have no idea if adding them assubmoduleswould get them installed if someone were to usedevtools::install_github.
So my question is, when writing an R package how can I manage external non-R dependencies which are updated constantly?
One analogous situation is to look at the packages
xlsxandXLConnect.Both packages depend on Java libraries.
xlsxdefines (and depends on) a stand-alone packagexlsxjarsthat only contains the libraries.In this way, the downstream code is decoupled from the libraries.