[R-pkg-devel] Package with JS dependency

Viechtbauer, Wolfgang (NP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Mon Feb 24 23:08:07 CET 2025


Like Duncan's rgl package, the mathjaxr package (https://cran.r-project.org/package=mathjaxr) also contains JS code (for MathJax). And one of the requirements to get the package onto CRAN was that the source package had to contain the unminified javascript files. The minification then happens during the installation process with the help of the 'js' package (using the lovely named uglify_files() function). So if you want to get the package on CRAN, I suspect you would have to go a similar route.

Best,
Wolfgang

> -----Original Message-----
> From: R-package-devel <r-package-devel-bounces using r-project.org> On Behalf Of
> Michael Chirico
> Sent: Saturday, February 22, 2025 17:30
> To: Jon Harmon <jonthegeek using gmail.com>
> Cc: R Package Development <r-package-devel using r-project.org>
> Subject: Re: [R-pkg-devel] Package with JS dependency
>
> Ah, thanks for looking into it further, I was a but surprised myself.
> Apologies for the misstatement & added noise.
>
> Could be that GitHub just doesn't index the potentially huge files, I've
> come across that with my r-mailing-list-archive repo.
>
> On Sat, Feb 22, 2025, 8:20 AM Jon Harmon <jonthegeek using gmail.com> wrote:
>
> > There are definitely packages with minified JS. I suspect this GitHub
> > search policy is causing the empty search: "Vendored and generated code is
> > excluded"
> >
> > Even with "is:generated" and/or "is:vendored", I can't get a search to find
> > this, for example:
> >
> https://github.com/cran/cookies/blob/eb72bda92734d7537061e008191c2041dbe49dff/in
> st/js/js.cookie.min.js
> >
> > On  Fri, 21 Feb 2025 09:06 AM Michael Chirico <michaelchirico4 using gmail.com>
> > wrote:
> >
> > > You might have a look at those. To Duncan's point, note there are also
> > > 0 min.js files:
> > >
> > https://github.com/search?q=org%3Acran+path%3Amin.js+-
> path%3ALICENSE.txt&type=code


More information about the R-package-devel mailing list