Open adilapapaya opened 7 years ago
Hi, sorry it took so long for us to respond to this!
Your use case is very interesting. Out of curiosity, are you able to share any applications you've built with this technique?
We don't have plans to distribute Shiny on npm
or anywhere else other than CRAN, but the topic of exposing Shiny to custom JavaScript apps has come up in our conversations in meetings and at conferences.
@alandipert We have a similar use-case I'm exploring. We have a map-based visualisation application written in React (re-frame, in fact!), and I'd like to allow people to write shiny apps to integrate with it: shiny-leaflet calls are intercepted to integrate with the main map, while we also manage the UI and redirect events back through the Shiny instance. The issues I'm facing at the moment are the reliance of shiny on the window object, and (this one) the inability to manage shiny via npm.
Hi.
Would it be possible to have
shiny.js
available via npm and bower so we cannpm install --save shinyjs
? This is specific only to theshiny.js
file and not the R-code. Right now, I 'hack' the system by manually copying theshiny.js
file into my node_modules directorI then add this to the beginning and end respectively of the
shiny.js
file so that I can import it into react apps.Would much prefer to be able to do it automatically via some kind of package manager. Happy to help update the relevant files in
tools
if you let me know how you envision it being done (separate shell script or part of the Gruntfile, etc).For some background, my backend is in Shiny but my front end is custom
index.html
andjs
files instead of the usualui.R
file. I usuallybower install
ornpm install
to install the relevant libs.Relevant docs: https://docs.npmjs.com/getting-started/publishing-npm-packages