add_module | R Documentation |
This function creates a module inside the R/
folder, based
on a specific module structure. This function can be used outside
of a {golem}
project.
add_module(
name,
pkg = get_golem_wd(),
open = TRUE,
dir_create = TRUE,
fct = NULL,
utils = NULL,
r6 = NULL,
js = NULL,
js_handler = NULL,
export = FALSE,
module_template = golem::module_template,
with_test = FALSE,
...
)
name |
The name of the module. |
pkg |
Path to the root of the package. Default is |
open |
Should the created file be opened? |
dir_create |
Creates the directory if it doesn't exist, default is |
fct |
If specified, creates a |
utils |
If specified, creates a |
r6 |
If specified, creates a |
js , js_handler |
If specified, creates a module related JavaScript file. |
export |
Should the module be exported? Default is |
module_template |
Function that serves as a module template. |
with_test |
should the module be created with tests? |
... |
Arguments to be passed to the |
The path to the file, invisibly.
This function will prefix the name
argument with mod_
.
module_template()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.