@@ -92,6 +92,14 @@ copy_from_pkg <- function(pkg_name, pkg_dir, local_dir, version_dir = fs::path_d
92
92
)
93
93
}
94
94
95
+ # Set sass compilation options
96
+ local_sass_options <- withr :: local_(function (x ) rlang :: exec(sass :: sass_options_set , !!! x ))
97
+ local_sass_options(list (
98
+ output_style = " compressed" ,
99
+ source_comments = FALSE ,
100
+ source_map_embed = FALSE
101
+ ))
102
+
95
103
96
104
# ------------------------------------------------------------------------------
97
105
# Must come first!
@@ -170,7 +178,7 @@ withr::with_options(
170
178
# Overwrite css file
171
179
ion_dep_dir <- fs :: path(www_shared , " ionrangeslider" )
172
180
fs :: file_move(
173
- fs :: path(temp_ion_dep_dir , " ionRangeSlider" , " ionRangeSlider.css" ),
181
+ fs :: path(temp_ion_dep_dir , " ionRangeSlider" , " ionRangeSlider.min. css" ),
174
182
fs :: path(ion_dep_dir , " css" , " ion.rangeSlider.css" )
175
183
)
176
184
# Cleanup
@@ -215,18 +223,10 @@ ignored <- lapply(woff_files, function(woff_file) {
215
223
216
224
# ------------------------------------------------------------------------------
217
225
message(" Render shiny.min.css with bs_theme()" )
218
- with_sass_options <- withr :: with_(function (x ) rlang :: exec(sass :: sass_options_set , !!! x ))
219
226
220
- sass_opts_minify <- list (
221
- output_style = " compressed" ,
222
- source_comments = FALSE ,
223
- source_map_embed = FALSE
224
- )
225
227
226
- shiny_css_dep <- with_sass_options(
227
- sass_opts_minify ,
228
- shiny ::: shinyDependencyCSS(shiny_theme )
229
- )
228
+
229
+ shiny_css_dep <- shiny ::: shinyDependencyCSS(shiny_theme )
230
230
shiny_css_bslib <- fs :: path(shiny_css_dep $ src $ file , shiny_css_dep $ stylesheet )
231
231
shiny_css_shared <- fs :: path(www_shared , " shiny.min.css" )
232
232
writeLines(
@@ -238,10 +238,7 @@ writeLines(
238
238
)
239
239
240
240
message(" Render selectize.min.js with bs_theme()" )
241
- selectize_css_dep <- with_sass_options(
242
- sass_opts_minify ,
243
- shiny ::: selectizeDependencyFunc(shiny_theme )
244
- )
241
+ selectize_css_dep <- shiny ::: selectizeDependencyFunc(shiny_theme )
245
242
selectize_css_bslib <- fs :: path(
246
243
selectize_css_dep $ src $ file ,
247
244
selectize_css_dep $ stylesheet
@@ -255,10 +252,7 @@ fs::file_copy(
255
252
)
256
253
257
254
message(" Render datepicker.min.css with bs_theme()" )
258
- datepicker_css_dep <- with_sass_options(
259
- sass_opts_minify ,
260
- shiny ::: datePickerCSS(shiny_theme )
261
- )
255
+ datepicker_css_dep <- shiny ::: datePickerCSS(shiny_theme )
262
256
datepicker_css_bslib <- fs :: path(
263
257
datepicker_css_dep $ src $ file ,
264
258
datepicker_css_dep $ stylesheet
0 commit comments