download: Download files from npm packages via unpkg

Description Usage Arguments Value References Examples

Description

Download files from npm packages via unpkg

Usage

1
2
3

Arguments

pkg

the name (and optionally the version) of an npm package. (e.g. 'jquery', 'jquery@3.0.0')

files

character vector of paths to files. These are used as the :file part of https://unpkg.com/:package@:version/:file

Value

a htmltools::htmlDependency object

References

https://unpkg.com

Examples

1
2
3
4
5
6
(fa <- download_main("fontawesome"))
htmltools::renderDependencies(list(fa), "href")
htmltools::renderDependencies(list(fa), "file")


(jquery <- download_files("jquery@3.0.0", "dist/jquery.slim.min.js"))

cpsievert/runpkg documentation built on May 4, 2019, 1:08 p.m.