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
clean_site default to preview = TRUE #1973
Conversation
This allows to have test helper that will also to the cleaning
Also I have opened #1974 for the idea we shared last Friday. If you find it interesting and good enough in its implementation, we could ship it with this. Otherwise, we have time to think about it. |
#' @export | ||
clean_site <- function(input = ".", preview = FALSE, quiet = FALSE, | ||
clean_site <- function(input = ".", preview = TRUE, quiet = FALSE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be interesting to have an option for preview
to change the default behavior of the IDE button to FALSE ?
Not so sure, so I did not add it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that could be useful (e.g., preview = getOption('rmarkdown.clean_site.preview', TRUE)
), but let's wait until someone asks for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I remember this method of yours now - not used to that: get ideas but wait for people asking ! 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can definitely also proactively ask if anyone wants this feature in advance. I just don't have the energy to do this myself :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Should
clean_site()
check for existence of the files and directories mentioned in message ?- Or should the
generator$clean()
function only return filepath that exists ?
I'd prefer the latter. I'll fix the problem in blogdown. Thanks!
#' @export | ||
clean_site <- function(input = ".", preview = FALSE, quiet = FALSE, | ||
clean_site <- function(input = ".", preview = TRUE, quiet = FALSE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that could be useful (e.g., preview = getOption('rmarkdown.clean_site.preview', TRUE)
), but let's wait until someone asks for it.
This will close #1971
preview = TRUE
by default now - this will affect the behavior of Clean All button in website project Build paneclean_site(preview = FALSE)
will effectively remove those filesquiet = FALSE
andpreview = FALSE
, a message is also output to console - useful for knowing what happens in the Build paneI also
mark_dirs
from bookdown - will do a PR in xfunOne question remaining:
clean_site()
check for existence of the files and directories mentioned in message ?generator$clean()
function only return filepath that exists ?I think the latter would be best but currently it does not - for example blogdown:
blogdown
folder does not exist,static/rmarkdown-libs
neither (because page bundle I think). I find it puzzling that it is output in the messageWhat do you think ?