This directory contains build tools for Shiny.
For TypeScript / JavaScript build tools, see the ./srcts folder.
Updating web libraries
Updating and patching bootstrap-datepicker
Updating
bootstrap-datepicker can be updated with the script updateBootstrapDatepicker.R.
After updating, our patches to bootstrap-datepicker must be applied using the script applyDatepickerPatches.R
After updating and applying patches, yarn grunt should be run per the instructions above in order to generate a minified JavaScript file.
Making a new patch
To create a new patch:
- Make any necessary changes to files in
inst/www/shared/datepicker - Do not commit your changes.
- Instead, create a patch with a command like
git diff > tools/datepicker-patches/012-a-description.patch. Patches are applied in alphabetic order (perlist.files), so you should name your patch based on the last one intools/datepicker-patchesso that it's applied last. - Revert
bootstrap-datepickerto its unpatched state by runningupdateBootstrapDatepicker.R - Apply all patches, including the one you just made, by running
applyDatepickerPatches.R - Run
yarn grunt - Test your changes
git addthe new.patchand any resulting changes
Updating and patching ion.rangeSlider
Updating
ion.rangeSlider can be updated with the script updateIonRangeSlider.R. That script downloads a specific version of ion.rangeSlider and applies our patches in tools/ion.rangeSlider-patches.
After updating and applying patches, yarn grunt should be run per the instructions above in order to generate a minified JavaScript file.
Making a new patch
To create a new patch:
- Make any necessary changes to files in
inst/www/shared/ion.rangeSlider - Do not commit your changes.
- Instead, create a patch with a command like
git diff > tools/ion.rangeSlider-patches/0004-a-description.patch. Patches are applied in alphabetic order (perlist.files), so you should name your patch based on the last one intools/ion.rangeSlider-patchesso that it's applied last. - Run
updateIonRangeSlider.Rto download the library and apply patches. - Run
yarn grunt - Test your changes
git addthe new.patchand any resulting changes
Updating Font-Awesome
- Edit
updateFontAwesome.Rto use the new version, and then run it. This will download and copy the files to the relevant locations. - Update the "font-awesome" htmlDependency in
R/bootstrap.Rto reflect the new version. - Update the documentation for the
icon()function inR/bootstrap.Rto reflect the new version. - Run
devtools::document(). - Commit the changes.
Updating jQuery
-
- Edit
updatejQuery.Rto use the new version, and then run it. This will download and copy the files to the relevant locations.
- Edit
- Update the "jquery" htmlDependency in
R/shinyui.Rto reflect the new version. - Update the documentation for the
shiny.jquery.versionoption inR/shiny-options.Rto reflect the new version. - Run
devtools::document(). - Commit the changes.
Updating Bootstrap-Accessibility-Plugin
- bootstrap-accessibility-plugin can be updated with the script
updateBootstrapAccessibilityPlugin.R. - Edit
updateBootstrapAccessibilityPlugin.Rto use the new version, and then run it. This will download and copy the files to the relevant locations. - Update the documentation for the
bootstrapLib()function inR/bootstrap.Rto reflect the new version. - Run
devtools::document(). - Commit the changes.
Updating and patching selectize
Updating
selectize and its accessibility plugin can be updated with the script updateSelectize.R. That script downloads a specific version of selectize and selectize-plugin-a11y, and applies our patches in tools/selectize-patches.
After updating and applying patches, yarn grunt should be run per the instructions above in order to generate a minified JavaScript file.
Making a new patch
To create a new patch:
- Make any necessary changes to files in
inst/www/shared/selectize - Do not commit your changes.
- Instead, create a patch with a command like
git diff > tools/selectize-patches/000-assign-unique-id-per-option.patch. Patches are applied in alphabetic order (perlist.files), so you should name your patch based on the last one intools/selectize-patchesso that it's applied last. - Run
updateSelectize.Rto download the library and apply patches. - Run
yarn grunt - Test your changes
git addthe new.patchand any resulting changes
Updating Shiny's [S]CSS
- Make any desired changes to source files in
inst/www/shared/shiny_scss - Run
Rscript updateShinyCSS.Rto generate a builtshiny.min.cssfile - Commit any changes