File: download.R

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 (24 lines) | stat: -rw-r--r-- 652 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
jq_cdn_download <- function(version) {
  basenames <- paste0("jquery-", version, c(".min.js", ".min.map", ".js"))
  target <- file.path("inst", "lib", version)
  dir.create(target, recursive = TRUE)
  download.file(
    file.path("https://code.jquery.com", basenames),
    file.path(target, basenames)
  )
}

unlink("inst/lib", recursive = TRUE)
jq_cdn_download("3.6.0")
jq_cdn_download("2.2.4")
jq_cdn_download("1.12.4")

download.file(
  "https://raw.githubusercontent.com/jquery/jquery/master/AUTHORS.txt",
  "inst/lib/AUTHORS.txt"
)

download.file(
  "https://raw.githubusercontent.com/jquery/jquery/master/LICENSE.txt",
  "inst/lib/LICENSE.txt"
)