-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom templates for DESCRIPTION, .Rproj, README.Rmd etc #14
Comments
related to |
I'm wondering whether we should encourage such templates to be stored in a package, because of It'd be a nearly empty packages with templates below inst/. |
You can only make people use a package if you have a createTemplatePackageProject() fn ;) Ultimately, yes I see teams adding extensions to pRojects in their own packages, but I would like the solution to enable referencing a template file so that folks can get started more quickly when they're not yet an adept package developer |
But to get started more quickly one can rely on |
yeah |
but I'd create a templating function like you say and maybe at the stage of creating the template package one could indicate a directory where the templates live at the moment. 😉 |
so I see the future use of the things like createBasicProject() being like:
Then when people make their own templates or wanna provide config they can either point to a dir on their machines or if they build a package they can refer to their own inst/ dir |
what's config as opposed to templates? packrat values, etc? Ideally if one has a package, one could indicate that so I'd make the argument "path_or_package", if it corresponds to an installed package, then I'd use it as a package. |
config might be whoami info or values to fill in licenses with or boilerplate yaml etc if one had a package (say createLDAnalysisProject = function(...){
createAnalysisProject(..., templates_dir = system.file("templates", pkg="lockeutils"), config_dir = system.file("defaults", pkg="lockeutils"))
} |
ah yes that's another way to imagine what the template package actually is. 🤔 it'd be |
To be tackled once the "rest" is more stable. |
So I'm still not sure about just having a folder. I'd much rather rely on a package. Several elements to keep in mind.
|
Enable people to define a custom templates dir to search first, before relying on devtools defaults
The text was updated successfully, but these errors were encountered: