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', '[email protected]')

files

character vector of paths to files. These are used as the :file part of https://unpkg.com/:[email protected]: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("[email protected]", "dist/jquery.slim.min.js"))

cpsievert/runpkg documentation built on Sept. 13, 2017, 4:46 a.m.