Can visNetwork save html dependencies (javascript libraries etc.) to a specific folder?

74 Views Asked by At

I have a script that saves many visNetwork html outputs in the same folder. Each html file has its own set of associated files (e.g. visNetwork.js, htmlwidgets.js) in a separate folder. As far as I can tell, the contents of the associated folders is the same in every instance. Given that each associated folder is about 1MB, it would make sense to save this information only once, and have all of the html outputs use the same folder.

The saveWidget function, which I think the visSave function is related to, has a libdir parameter that specifies where these dependencies will be saved. But the libdir parameter doesn't seem to be supported in visNetwork. Is there some other way of specifying where the dependencies are saved?

(Note - I do NOT want to embed the dependencies into the html file, as per the selfcontained option. I just want to save them in a specific place to avoid replication.)

1

There are 1 best solutions below

0
On

Ugh, all I had to do was call saveWidget directly and it works just the same as visSave, while allowing the libdir parameter.

Sorry, bit of a noob with this stuff!