title: How to skip writing dependencies in htmlwidgets::saveWidget()?
body: <p>When visualizing data with plotly, i want to write widgets as html-documents without <code>htmlwidgets::saveWidget</code> writing dependencies every time, assuming that these already are in place, to save processing time. The widgets need to be self-contained to save disk space.</p>
  
  <pre><code>library(plotly)
  t &lt;- Sys.time()
  p &lt;- plot_ly(ggplot2::diamonds, y = ~price, color = ~cut, type = "box")
  htmlwidgets::saveWidget(as_widget(p), "test.html", selfcontained = F, libdir = NULL)
  print(Sys.time() - t)
  </code></pre>
  
  <p><code>Time difference of 4.303076 secs</code> on my machine.</p>
  
  <p>This produces ~6 mb of data only in depedencies (crosstalk-1.0.0, htmlwidgets-1.2, jquery-1.11.3, plotly-binding-4.7.1.9000, plotly-htmlwidgets-css-1.38.3, plotly-main-1.38.3, typedarray-0.1)</p>
  
  <p><code>htmlwidgets::saveWidget</code> writes dependencies although these files already exist. Can  this be prevented?</p>