With the new behavior of devtools with respect to building vignettes...I'm not 100% sure on the workflow for submitting to CRAN. I've read that the reason for inst/doc being deleted on build and check is to prevent developers from having old/stale vignettes in that folder. Historically, I've used devtools::build_vignettes() to get the vignettes built and put in inst/doc, then check (with --as-cran) to make sure the package was being checked in the same way CRAN would check.
Now I'm wondering if there is a new prescribed devtools process. What I've come up with is:
- Add "--compact-vignettes" to the Build Source additional arguments
- Build Source
- Check via uploading the source to r-hub.
My ramblings:
a. I'm currently unable to figure out a local way to check via devtools. If I just do build/check, I see during check:
v checking installed files from 'inst/doc' ...
But since that folder was deleted...how could it check anything? (that CRAN presumably will check)
b. I can use the Terminal and do:
R CMD build . --compact-vignettes
R CMD check ./mypackage_1.0.1.tar.gz --as-cran
(and this seems OK, I can un-tar.gz the file and absolutely confirm that there are built vignettes in the inst/doc folder compacted).
I feel like I must be missing some slick devtools workflow. I see I can run devtools::build(args = "--compact-vignettes"), but I don't see how to check that directly via devtools (since that is what I'd be submitting to CRAN). I'm probably making a mountain out of a molehill...but I get very nervous submitting packages to CRAN....