Closed dmurdoch closed 2 years ago
Thanks @dmurdoch! If you don't mind, it'd also be great to have a unit test
Sure, I'll see if I can add one.
The last commit adds a test. It just tries to see if the function runs without error; I think other tests check that the results are okay.
Just committed changes as per suggestions.
Just a note in case there are more comments: I'm going offline soon, and won't be available for a week or two. I'll address other comments when I get back. If they're urgently needed before that, someone else will have to take over.
I made some changes to the pluck_src
function and merged into main manually.
This would much simpler and easier to implement if the htmlDependency
function normalized the shape of the data structures on the way in. We do it here in TypeScript: https://github.com/rstudio/shiny/blob/474f1400/srcts/src/shiny/render.ts#L355-L467. Maybe someday. Unfortunately, there might code out there that will break because it assumes the older format (just a character vector, not a list like script = list(src="abc"))
)
Also fixes the error message to only report missing files. Fixes #320.