~/talk

Creating a JavaScript Library for Your Shiny Application

Talkat ShinyConf 2023 · 2023-03-15..03-17· [javascript]
links:none on file
slides:none on file

Step-by-step recipe for moving from many scattered scripts to a maintainable library: create a srcjs directory inside the R package, install Node and use npm to manage dependencies (jQuery, shiny helper libs, sortable.js), split code into ES modules with explicit exports/imports, add linting (eslint) and unit tests (jest), add a build script and run npm run build to bundle and minify into a single minified file placed in inst/www, wire tests into GitHub Actions; result: one 25-line index that works in Designer and is far easier to maintain.

AI-written summary · about

  1. 0:00Intro
  2. 1:07Shiny & JavaScript
  3. 2:12Motivation
  4. 4:08Library Set-Up
  5. 7:21Dependency Management
  6. 9:43Bundling/Minifying Code
  7. 11:21Linting
  8. 13:15Communication Between Files
  9. 14:46Class Inheritance
  10. 16:45Library Structure
  11. 17:24Unit Testing
  12. 19:39Continuous Integration (CI)
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.