diff --git a/DESCRIPTION b/DESCRIPTION index 830954e0..05f433a9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -14,11 +14,8 @@ Imports: jsonlite, utils Suggests: - dplyr, - janitor, knitr, rmarkdown, - rvest, testthat VignetteBuilder: knitr diff --git a/dev/0-dev_history.Rmd b/dev/0-dev_history.Rmd index 9d0a1769..7b6dbed9 100755 --- a/dev/0-dev_history.Rmd +++ b/dev/0-dev_history.Rmd @@ -74,7 +74,7 @@ fusen::inflate(flat_file = "dev/build_envs.Rmd", # Run but keep eval=FALSE to avoid infinite loop # Execute in the console directly fusen::inflate(flat_file = "dev/save_r_nix_revs.Rmd", - vignette_name = "dev-save_r_nix_revs.Rmd", + vignette_name = "[Dev]-Saving historical revisions", overwrite = TRUE) ``` @@ -104,7 +104,7 @@ fusen::inflate(flat_file = "dev/zzz.Rmd", ```{r} fusen::inflate(flat_file = "dev/building_envs_with_rix.Rmd", - vignette_name = "building_envs_with_rix", + vignette_name = "Building reproducible development environments with {rix}", overwrite = TRUE) ``` diff --git a/dev/building_envs_with_rix.Rmd b/dev/building_envs_with_rix.Rmd index e303fa95..c958c35a 100644 --- a/dev/building_envs_with_rix.Rmd +++ b/dev/building_envs_with_rix.Rmd @@ -5,6 +5,8 @@ editor_options: chunk_output_type: console --- +Basic usage: + ```{r} path_default_nix <- tempdir() @@ -20,5 +22,25 @@ rix(r_ver = "current", ``` ```{r} -cat(readLines(paste0(path_default_nix, "/default.nix"))) +cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n") +``` + +Specifying a package on Github: + +```{r} +rix(r_ver = "current", + r_pkgs = c("dplyr", "janitor"), + other_pkgs = c("quarto"), + git_pkgs = list(package_name = "housing", + repo_url = "https://github.com/rap4all/housing/", + branch_name = "fusen", + commit = "1c860959310b80e67c41f7bbdc3e84cef00df18e"), + ide = "other", + path = path_default_nix, + overwrite = TRUE) + +``` + +```{r} +cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n") ``` diff --git a/dev/save_r_nix_revs.Rmd b/dev/save_r_nix_revs.Rmd index ca5e45ac..2d9e9daf 100644 --- a/dev/save_r_nix_revs.Rmd +++ b/dev/save_r_nix_revs.Rmd @@ -11,7 +11,7 @@ web-interface to look for packages and get their revisions. It is possible to scrape the table and get the data: -```{r} +```{r, eval = F} library(rvest) library(dplyr) library(janitor) diff --git a/vignettes/building_envs_with_rix.Rmd b/vignettes/building_envs_with_rix.Rmd index d71faf2b..3b026246 100644 --- a/vignettes/building_envs_with_rix.Rmd +++ b/vignettes/building_envs_with_rix.Rmd @@ -20,6 +20,9 @@ library(rix) +Basic usage: + + ```{r} path_default_nix <- tempdir() @@ -35,6 +38,27 @@ rix(r_ver = "current", ``` ```{r} -cat(readLines(paste0(path_default_nix, "/default.nix"))) +cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n") +``` + +Specifying a package on Github: + + +```{r} +rix(r_ver = "current", + r_pkgs = c("dplyr", "janitor"), + other_pkgs = c("quarto"), + git_pkgs = list(package_name = "housing", + repo_url = "https://github.com/rap4all/housing/", + branch_name = "fusen", + commit = "1c860959310b80e67c41f7bbdc3e84cef00df18e"), + ide = "other", + path = path_default_nix, + overwrite = TRUE) + +``` + +```{r} +cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n") ``` diff --git a/vignettes/dev-save_r_nix_revs.Rmd b/vignettes/dev-save_r_nix_revs.Rmd index ee3a12a3..30e66f16 100644 --- a/vignettes/dev-save_r_nix_revs.Rmd +++ b/vignettes/dev-save_r_nix_revs.Rmd @@ -27,7 +27,7 @@ web-interface to look for packages and get their revisions. It is possible to scrape the table and get the data: -```{r} +```{r eval = F} library(rvest) library(dplyr) library(janitor)