Skip to contents

Writes an HTML widget's JS and CSS dependencies to files and returns a snippet for their inclusion in the <head> of an HTML document.

Usage

write_widget_deps(
  x,
  path,
  path_base,
  path_head_snippet = NULL,
  quiet = !is.null(path_head_snippet)
)

Arguments

x

HTML widget object.

path

Directory path to write the HTML widget's dependencies to. A subfolder will be created for each dependency.

path_base

Base path to determine the relative root of path for inclusion of the widget's dependencies. Must be a parent of or equal to path.

path_head_snippet

Optional file path to write the snippet for inclusion of the widget's dependencies in the <head> of an HTML document to.

quiet

Whether or not to print the snippet for inclusion of the widget's dependencies to console.

Value

An HTML object suitable for inclusion in the <head> of an HTML document, invisibly.

Details

To write the HTML widget's core tags to file, use write_widget().

See also

Other HTML widget functions: write_widget()