Skip to content

Commit

Permalink
to cran
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Oct 19, 2017
1 parent 95cf20a commit f0553de
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 29 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
^.*\.Rproj$
^\.Rproj\.user$
^inst\\images$
^inst\\examples\\garbage$
^inst\\examples\\bookmarking$
^cran-comments\.md$
^docs$
^vignettes$
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: shinyWidgets
Title: Custom Inputs Widgets for Shiny
Version: 0.3.5.900
Version: 0.3.6
Authors@R: c(
person("Victor", "Perrier", email = "victor.perrier@dreamrs.fr", role = c("aut", "cre")),
person("Fanny", "Meyer", email = "fanny.meyer@dreamrs.fr", role = c("aut")),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
shinyWidgets 0.3.5.900
shinyWidgets 0.3.6
==================

* New widget : `sliderTextInput` : a slider for character vector.
Expand Down
7 changes: 0 additions & 7 deletions inst/www/shinyWidgets.min.js

This file was deleted.

34 changes: 14 additions & 20 deletions inst/www/uglify.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@

# Uglify shinyWidgets files -----------------------------------------------

# js
js_files <- list.files(path = "inst/www/", pattern = "\\.js$", full.names = TRUE, recursive = TRUE)
# js ----

# not used
js_files <- list.files(path = "inst/www/", pattern = "\\.js$", full.names = TRUE, recursive = TRUE)
js_files <- lapply(js_files, readLines)
js_files <- lapply(js_files, paste, collapse = "\n")
js_files <- paste(unlist(js_files), collapse = "\n")


library("js")
js_files <- uglify_optimize(text = js_files)


writeLines(text = js_files, con = "inst/www/shinyWidgets.min.js")



# bindings
# bindings ----

# create one file with all bindings
bindings_files <- list.files(path = "inst/www/", pattern = "bindings", full.names = TRUE, recursive = TRUE)
bindings_files <- bindings_files[bindings_files != "inst/www/shinyWidgets-bindings.min.js"]
bindings_files <- lapply(bindings_files, readLines)
Expand All @@ -33,10 +32,12 @@ writeLines(text = bindings_files, con = "inst/www/shinyWidgets-bindings.min.js")



# css
# css ----

# all files
css_files <- list.files(path = "inst/www/", pattern = "\\.css$", full.names = TRUE, recursive = TRUE)

# keep the ones not integrated via a widgets
css_files <- css_files[
grepl(pattern = "checkboxGroupButtons", x = css_files) |
grepl(pattern = "radioGroupButtons", x = css_files) |
Expand All @@ -46,22 +47,15 @@ css_files <- css_files[
grepl(pattern = "sw-color-selector", x = css_files)
]

# css_files <- css_files[!grepl(pattern = "shinyWidgets", x = css_files)]
# css_files <- css_files[!grepl(pattern = "bootstrap-select", x = css_files)]
# css_files <- css_files[!grepl(pattern = "bootstrap-switch", x = css_files)]
# css_files <- css_files[!grepl(pattern = "bttn", x = css_files)]
# css_files <- css_files[!grepl(pattern = "animate", x = css_files)]
# css_files <- css_files[!grepl(pattern = "sweetalert", x = css_files)]
# css_files <- css_files[!grepl(pattern = "circle-button-old", x = css_files)]
# css_files <- css_files[!grepl(pattern = "sw-dropdown", x = css_files)]
# css_files <- css_files[!grepl(pattern = "multi.min", x = css_files)]
# css_files <- css_files[!grepl(pattern = "awesome-bootstrap-checkbox-shiny", x = css_files)]
# css_files <- css_files[!grepl(pattern = "fav-icons", x = css_files)]
# css_files <- css_files[!grepl(pattern = "fav-button.css", x = css_files)]
# read them all
css_files <- lapply(css_files, readLines)
# concat in one string
css_files <- lapply(css_files, paste, collapse = "\n")
css_files <- paste(unlist(css_files), collapse = "\n")

# write them all
writeLines(text = css_files, con = "inst/www/shinyWidgets.css")

# go here to minify the file
# https://cssminifier.com/

0 comments on commit f0553de

Please sign in to comment.