scaffold_golem: Golem

Description Usage Arguments Details Value Examples

View source: R/golem.R

Description

Creates the basic structure for golem app with JavaScript.

Usage

1
2
3
4
5
6
scaffold_golem(
  react = FALSE,
  vue = FALSE,
  use_cdn = TRUE,
  edit = interactive()
)

Arguments

react

Whether to include React, internally runs apply_react() and adapts the srcjs/index.js template for React.

vue

Whether to include Vue, internally runs apply_vue() and adapts the srcjs/index.js template for Vue.

use_cdn

Whether to use the CDN for react or vue dependencies, this is passed to apply_react() or apply_vue() if react or vue arguments are set to TRUE and ignored otherwise.

edit

Automatically open pertinent files.

Details

Only one of react or vue can be set to TRUE.

Value

TRUE (invisibly) if successfully run.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
if(interactive()){
# current directory
wd <- getwd()

# create a mock up ambiorix project
tmp <- tmp_golem()

# move to package
setwd(tmp)

# scaffold ambiorix
scaffold_golem()

# clean up
setwd(wd)
tmp_delete(tmp)
}

packer documentation built on Aug. 14, 2021, 5:07 p.m.