write_widget_deps: Write HTML widget dependencies

write_widget_depsR Documentation

Write HTML widget dependencies

Description

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.

Details

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

Value

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

See Also

Other HTML widget functions: write_widget()


salim-b/pal documentation built on Feb. 28, 2025, 6:51 p.m.