File: README.md

package info (click to toggle)
r-cran-jquerylib 0.1.4%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 144 kB
  • sloc: sh: 28; makefile: 8
file content (47 lines) | stat: -rw-r--r-- 1,383 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

<!-- badges: start -->

[![R-CMD-check](https://github.com/rstudio/jquerylib/workflows/R-CMD-check/badge.svg)](https://github.com/rstudio/jquerylib/actions)
[![CRAN
status](https://www.r-pkg.org/badges/version/jquerylib)](https://CRAN.R-project.org/package=jquerylib)
<!-- badges: end -->

# jquerylib

Obtain ‘jQuery’ as an HTML dependency object

## Installation

**jquerylib** can be installed with:

``` r
install.packages("jquerylib")
```

## Usage

The **jquerylib** package currently has one function,`jquery_core()`,
which returns a `htmltools::htmlDependency()` object that [bundles a
stable version of jQuery Core](https://code.jquery.com/). Here we use it
to obtain jQuery 3.x, but currently 2.x and 1.x are also supported. You
likely won’t need to use this package directly, but packages like
**shiny** and **rmarkdown** will eventually use this package to avoid
bundling redundant copies jQuery.

``` r
jquerylib::jquery_core(3)
```

    ## List of 10
    ##  $ name      : chr "jquery"
    ##  $ version   : chr "3.6.0"
    ##  $ src       :List of 1
    ##   ..$ file: chr "lib/3.6.0"
    ##  $ meta      : NULL
    ##  $ script    : chr "jquery-3.6.0.min.js"
    ##  $ stylesheet: NULL
    ##  $ head      : NULL
    ##  $ attachment: NULL
    ##  $ package   : chr "jquerylib"
    ##  $ all_files : logi TRUE
    ##  - attr(*, "class")= chr "html_dependency"