use_hot_file: Write a template file

Description Usage Arguments See Also Examples

View source: R/use_hot_file.R

Description

Rather than using create_hot_project() to start a new project folder, you may use use_hot_file() to write a single file from any project template. The functions use_hot_gitignore() and use_hot_readme() are shortcuts for use_hot_file("gitignore") and use_hot_file("readme").

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
use_hot_file(
  name = NULL,
  filename = NULL,
  template = hotfun::project_template,
  open = interactive()
)

use_hot_gitignore(filename = NULL, template = NULL)

use_hot_readme(filename = NULL, template = NULL)

Arguments

name

Name of file to write. Not sure of the files available to you? Run the function without specifying a name, and all files available within the template will print.

filename

Optional argument to specify the name of the file to be written. Paths/filename is relative to project base (e.g. here::here())

template

A project template. See vignette for details.

open

If TRUE, opens the new file.

See Also

create_hot_project()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# create gitignore file
use_project_file("gitignore")
use_project_gitignore()

# create README.md file
use_project_file("readme")
use_project_readme()

## End(Not run)

ddsjoberg/hotfun documentation built on Dec. 12, 2021, 3:41 a.m.