-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
14 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,41 @@ | ||
#' RStudio Addin: Containerize R Markdown Document | ||
#' | ||
#' Call this function as an addin to dockerize (lift) the current document. | ||
#' RStudio addin for containerizing the current document. | ||
#' | ||
#' @importFrom rstudioapi getActiveDocumentContext | ||
#' | ||
#' @keywords internal | ||
addin_lift = function() { | ||
|
||
context = rstudioapi::getActiveDocumentContext() | ||
path = normalizePath(context$'path') | ||
lift(path) | ||
|
||
} | ||
|
||
#' RStudio Addin: Containerize and Render R Markdown Document with Docker | ||
#' | ||
#' Call this function as an addin to containerize and render | ||
#' the current document. | ||
#' RStudio addin for containerizing and rendering the current document. | ||
#' | ||
#' @importFrom rstudioapi getActiveDocumentContext | ||
#' | ||
#' @keywords internal | ||
addin_lift_render_docker = function() { | ||
|
||
context = rstudioapi::getActiveDocumentContext() | ||
path = normalizePath(context$'path') | ||
lift(path) | ||
render_docker(path) | ||
|
||
} | ||
|
||
#' RStudio Addin: Purge Docker Image | ||
#' | ||
#' Call this function as an addin to removes the Docker image used | ||
#' for rendering the current document. | ||
#' RStudio addin for removing the Docker image used for | ||
#' rendering the current document. | ||
#' | ||
#' @importFrom rstudioapi getActiveDocumentContext | ||
#' | ||
#' @keywords internal | ||
addin_purge_image = function() { | ||
|
||
context = rstudioapi::getActiveDocumentContext() | ||
path = normalizePath(context$'path') | ||
path = paste0(file_dir(path), '/', file_name_sans(path), '.docker.yml') | ||
purge_image(path) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.