Conversation
…n which allows the user to specify whether or not html dependencies should be overwritten. When used to, for example, render rmarkdown html documents this can speed up I/O time considerably. If the dependency does not exist in the target directory and overwrite_dir is FALSE, the parameter is ignored and the directory is overwritten as usual.
There was a problem hiding this comment.
LGTM, other than a few cosmetic issues like too wide lines in NEWS.md and roxygen, & should be &&, and missing spaces after if.
You also need to roxygenize to fix the current errors on Travis.
Thanks!
For the record, the background of this PR is https://stackoverflow.com/q/52337372/559676
| target_dir <- file.path(outputDir, target_dir) | ||
|
|
||
| # if overwrite is false check to see if the file already exists | ||
| if(!overwrite_dir & dir_exists(target_dir)){ |
There was a problem hiding this comment.
The condition dir_exists(target_dir) may be a little weak. A stronger version is to check if all filenames in the target dir and the dependency object are identical. This makes sure when the dependency is updated (in future versions of the package where the dependency is introduced), you'll get the new version.
|
Ryan Haunfelder seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
This pull request adds the ability to skip overwriting html dependencies if they already exist in the function copyDependenciesToDir. Intended to be used with rmarkdown::render to speed up rendering by decreasing I/O time.