rhino
rhino copied to clipboard
Research if RStudio jobs can be used to run Rhino in the background
This would be useful e.g. for rhino::build_js(watch = TRUE) or for running the app.
A working example created for e2e tests (interactive mode) can be found here.
I'll extract the example into this comment and delete the old branch to keep things tidy. The code can also be found under a tag here.
We can use RStudio jobs to run e.g. E2E tests with the following code snippet (replace yarn(command) in test_e2e()):
if (isTRUE(interactive) && rstudioapi::isAvailable()) {
job::job({
rhino:::yarn(command)
}, import = c(command)
)
} else {
yarn(command)
}