inst/scripts/servr.R

# this script is used by bookdown::serve_book() to continuously render the book
local({
  args = commandArgs(TRUE)
  if (length(args) < 4) return()
  quiet = args[4] == 'TRUE'
  res = bookdown::render_book(
    args[-(1:4)], args[1], output_dir = args[2], envir = globalenv(),
    preview = args[3] == 'TRUE', quiet = quiet
  )
  if (quiet) invisible(res) else res
})

Try the bookdown package in your browser

Any scripts or data that you put into this service are public.

bookdown documentation built on Sept. 5, 2021, 5:19 p.m.