(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
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to