Files
shiny/tools/updateDataTables.R
Carson Sievert 89aaa977e8 Update datatables.js from 1.10.5 to 1.10.22 and deprecate renderDataTable()/dataTableOutput() (#3998)
* Update datatables.js from 1.10.5 to 1.10.22. Deprecate renderDataTable()/DTOutput()

* Update news; go back to old types version

* Clean up

* Update NEWS.md

* Update NEWS.md
2024-03-19 14:50:15 -05:00

32 lines
730 B
R
Executable File

#!/usr/bin/env Rscript
# This script downloads DataTabes from its GitHub repository,
# https://github.com/DataTables/DataTables
# This script can be sourced from RStudio, or run with Rscript.
version <- "1.10.22"
cdn <- file.path("https://cdn.datatables.net", version)
dest <- rprojroot::find_package_root_file("inst/www/shared/datatables")
withr::with_dir(dest, {
files <- c(
"js/jquery.dataTables.min.js",
"js/dataTables.bootstrap.js",
"css/dataTables.bootstrap.css",
"images/sort_desc.png",
"images/sort_desc_disabled.png",
"images/sort_both.png",
"images/sort_asc.png",
"images/sort_asc_disabled.png"
)
lapply(files, function(f) {
download.file(file.path(cdn, f), f)
})
})