Hi Andrew, This is something that came up with the mathjaxr package, which bundles MathJax. Originally it included the minified code, but this was not acceptable as the proper source code, especially for the Debian packages.
So the package then included the unminified code that was minified via a make file on installation if the 'js' package was installed. So 'js' was a suggested package, not required. Unfortunately, the minification with js no longer works with the most recent version of MathJax (same issue as https://github.com/jeroen/js/issues/5), but since CRAN packages can now be a bit larger (I believe up to 10MB), the minification is no longer a hard requirement to get mathjaxr on CRAN and I removed this step from the most recent version. But you can grab version 1.8.0 from https://cran.r-project.org/src/contrib/Archive/mathjaxr/ to see how things used to be done. Best, Wolfgang > -----Original Message----- > From: R-package-devel <[email protected]> On Behalf Of > James Lamb > Sent: Thursday, January 15, 2026 02:19 > To: [email protected] > Cc: R Package Development <[email protected]> > Subject: Re: [R-pkg-devel] Specifying non-C/C++ build-time dependency > > (forgot to CC the list on my previous reply) > > Hey Andrew, > > To avoid needing to declare the dependency in any context, assuming that > the minification is deterministic and not dependent on any details of the > runtime environment (like CPU architecture), I recommend just doing the > minification in a shell script, Makefile, etc. BEFORE calling `R CMD > BUILD`, then uploading a package to CRAN vendoring already-minified sources. > > I think you'll find it's easier that way (and easier for any users who end > up building your package from source). > > Cheers, > > - James > > On Tue, Jan 13, 2026, 11:55 PM Andrew Johnson < > [email protected]> wrote: > > > Hi all! > > > > I have an R package which uses several JS scripts/libraries, and I'm > > trying to configure the build process to minify the JS files at build-time > > (via my jsutils package: https://cran.r-project.org/web/packages/jsutils/ > > ). > > > > My current approach is using a configure script to run the minification, > > with the jsutils package added as an Import ( > > https://github.com/AUS-DOH-Safety-and-Quality/controlcharts/pull/25). But > > this adds an additional runtime dependency when it's only needed at build > > time. > > > > Are there any recommended ways for specifying build-time dependencies when > > the package doesn't require compilation? My attempts to use the LinkingTo > > field so far are giving check notes for not having source or include files. > > > > Any suggestions are much appreciated! > > > > Thanks, > > Andrew ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
