I've peeked at existing packages (e.g. {shinyWidgets}) to see how others have done this, but I'm also keen on reading guidelines on how to best distribute custom Shiny bindings/inputs/outputs via a package. There seem to be quite a few ways to do this.
Some steps are fairly straight-forward, like where to place the JS and CSS files (e.g. via /inst/assets/...
), and registering input handlers in the package's .onLoad()
routine. But for other steps, particularly where & how to register Shiny's resource path to those JS/CSS files, it's a little less clear. There can be a 'registration' step that the application author needs to make (e.g. a useTheseFiles()
call as part of the UI construction), but it's also possible for the package to handle some of this itself, and I'm wondering what the accepted best-practices are (if any).
Do folks here know of any good resources for this?