* Calling `runApp("app.R")` ignored options passed into `shinyApp()`
Fixes#1942.
This was caused by shinyAppDir_appR (which was called by shinyAppDir
and shinyAppFile, which were called when runApp() was used with either
no args or a path) dropping shinyApp() options on the floor.
Fixing this was not as simple as not dropping those options. Before
this commit, the app.R file was not invoked until after the host and
port options (possibly others) were already finalized. This commit
changes the effective sequence of events during startup.
- Calling shinyAppFile() or shinyAppDir() that points to a single-file
app, now causes the app.R file to be sourced immediately; previously,
sourcing would happen only at onStart(). (Honestly, the new behavior
seems less surprising anyway.)
- The support files (R/*.R) for app.R were sourced during onStart. I've
moved this so that the support files are sourced right before app.R
is, and re-sourced every time app.R reloads.
* Code review feedback
* Code review feedback: improve test
* Roxygenize