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 Oct. 16, 2024, 1:08 a.m.