View source: R/register_config_file.R
register_all_to_config | R Documentation |
Helps transition from non-fusen packages or made with earlier version
register_all_to_config(pkg = ".", config_file)
pkg |
Path to the package from which to add file to configuration file |
config_file |
Path to the configuration file |
Invisible path to 'fusen' configuration file
check_not_registered_files()
for the list of files not already associated with a flat file in the config file,
## Not run:
# Usually run this one inside the current project
# Note: running this will write "dev/config_fusen.yaml" in your working directory
register_all_to_config()
## End(Not run)
# Or you can try on the reproducible example
dummypackage <- tempfile("register")
dir.create(dummypackage)
# {fusen} steps
fill_description(pkg = dummypackage, fields = list(Title = "Dummy Package"))
dev_file <- suppressMessages(add_flat_template(pkg = dummypackage, overwrite = TRUE, open = FALSE))
flat_file <- dev_file[grepl("flat_", dev_file)]
# Inflate once
usethis::with_project(dummypackage, {
suppressMessages(
inflate(
pkg = dummypackage,
flat_file = flat_file,
vignette_name = "Get started",
check = FALSE,
open_vignette = FALSE
)
)
out_path <- register_all_to_config(dummypackage)
# Look at the output
yaml::read_yaml(out_path)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.