2525# ' }
2626# '
2727# ' @export
28- quarto_publish_doc <- function (input ,
29- name = NULL ,
30- title = NULL ,
31- server = NULL ,
32- account = NULL ,
33- render = c(" local" , " server" , " none" ),
34- metadata = list (),
35- ... ) {
28+ quarto_publish_doc <- function (
29+ input ,
30+ name = NULL ,
31+ title = NULL ,
32+ server = NULL ,
33+ account = NULL ,
34+ render = c(" local" , " server" , " none" ),
35+ metadata = list (),
36+ ...
37+ ) {
3638 validate_rsconnect()
3739 # resolve render
3840 render <- match.arg(render )
@@ -51,7 +53,8 @@ quarto_publish_doc <- function(input,
5153 # render if requested (always render self-contained locally for rpubs)
5254 if (! is.null(rpubs_destination )) {
5355 render <- " local"
54- quarto_render(input ,
56+ quarto_render(
57+ input ,
5558 output_format = format ,
5659 pandoc_args = " --self-contained"
5760 )
@@ -139,14 +142,16 @@ quarto_publish_doc <- function(input,
139142
140143# ' @rdname quarto_publish_doc
141144# ' @export
142- quarto_publish_app <- function (input = getwd(),
143- name = NULL ,
144- title = NULL ,
145- server = NULL ,
146- account = NULL ,
147- render = c(" local" , " server" , " none" ),
148- metadata = list (),
149- ... ) {
145+ quarto_publish_app <- function (
146+ input = getwd(),
147+ name = NULL ,
148+ title = NULL ,
149+ server = NULL ,
150+ account = NULL ,
151+ render = c(" local" , " server" , " none" ),
152+ metadata = list (),
153+ ...
154+ ) {
150155 validate_rsconnect()
151156
152157 # resolve render
@@ -194,14 +199,16 @@ quarto_publish_app <- function(input = getwd(),
194199
195200# ' @rdname quarto_publish_doc
196201# ' @export
197- quarto_publish_site <- function (input = getwd(),
198- name = NULL ,
199- title = NULL ,
200- server = NULL ,
201- account = NULL ,
202- render = c(" local" , " server" , " none" ),
203- metadata = list (),
204- ... ) {
202+ quarto_publish_site <- function (
203+ input = getwd(),
204+ name = NULL ,
205+ title = NULL ,
206+ server = NULL ,
207+ account = NULL ,
208+ render = c(" local" , " server" , " none" ),
209+ metadata = list (),
210+ ...
211+ ) {
205212 validate_rsconnect()
206213
207214 # resolve render
@@ -257,8 +264,12 @@ quarto_publish_site <- function(input = getwd(),
257264
258265find_app_primary_doc <- function (dir ) {
259266 preferred <- c(
260- " index.Rmd" , " index.rmd" , " index.qmd" ,
261- " ui.Rmd" , " ui.rmd" , " ui.qmd"
267+ " index.Rmd" ,
268+ " index.rmd" ,
269+ " index.qmd" ,
270+ " ui.Rmd" ,
271+ " ui.rmd" ,
272+ " ui.qmd"
262273 )
263274 preferred <- preferred [file.exists(file.path(dir , preferred ))]
264275 if (length(preferred ) > 0 ) {
@@ -283,7 +294,9 @@ find_app_primary_doc <- function(dir) {
283294}
284295
285296is_shiny_prerendered <- function (runtime , server = NULL ) {
286- if (identical(runtime , " shinyrmd" ) || identical(runtime , " shiny_prerendered" )) {
297+ if (
298+ identical(runtime , " shinyrmd" ) || identical(runtime , " shiny_prerendered" )
299+ ) {
287300 TRUE
288301 } else if (identical(server , " shiny" )) {
289302 TRUE
@@ -365,7 +378,10 @@ resolve_destination <- function(server, account, allowShinyapps) {
365378 # create server if we need to
366379 servers <- rsconnect :: servers()
367380 if (nrow(subset(servers , servers $ name == server )) == 0 ) {
368- rsconnect :: addServer(sprintf(" %s/__api__" , server_with_protocol ), server )
381+ rsconnect :: addServer(
382+ sprintf(" %s/__api__" , server_with_protocol ),
383+ server
384+ )
369385 }
370386
371387 # connect user
@@ -374,7 +390,8 @@ resolve_destination <- function(server, account, allowShinyapps) {
374390 account <- accounts $ name
375391 } else {
376392 stop(
377- " There is more than one account registered for " , server ,
393+ " There is more than one account registered for " ,
394+ server ,
378395 " \n Please specify which account you want to publish to."
379396 )
380397 }
@@ -387,7 +404,9 @@ resolve_destination <- function(server, account, allowShinyapps) {
387404}
388405
389406
390- validate_rsconnect <- function (reason = " for publishing using quarto R package." ) {
407+ validate_rsconnect <- function (
408+ reason = " for publishing using quarto R package."
409+ ) {
391410 rlang :: check_installed(" rsconnect" , version = " 0.8.26" , reason = reason )
392411}
393412
0 commit comments