rhino icon indicating copy to clipboard operation
rhino copied to clipboard

Research if RStudio jobs can be used to run Rhino in the background

Open kamilzyla opened this issue 3 years ago • 1 comments

This would be useful e.g. for rhino::build_js(watch = TRUE) or for running the app.

kamilzyla avatar Feb 18 '22 14:02 kamilzyla

A working example created for e2e tests (interactive mode) can be found here.

jakubnowicki avatar Feb 28 '22 15:02 jakubnowicki

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)
  }

kamilzyla avatar Sep 29 '22 08:09 kamilzyla