From 339ad5affe5193492d7bb6fcc98da8dc7164d38d Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Thu, 11 Nov 2021 23:56:56 -0500 Subject: [PATCH] Add package docs --- R/rsthemes-package.R | 27 +++++++++++++++ R/rsthemes.R | 22 ++++--------- man/{rsthemes.Rd => rsthemes-actions.Rd} | 14 +++----- man/rsthemes-package.Rd | 42 ++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 25 deletions(-) create mode 100644 R/rsthemes-package.R rename man/{rsthemes.Rd => rsthemes-actions.Rd} (87%) create mode 100644 man/rsthemes-package.Rd diff --git a/R/rsthemes-package.R b/R/rsthemes-package.R new file mode 100644 index 0000000..09501fc --- /dev/null +++ b/R/rsthemes-package.R @@ -0,0 +1,27 @@ +#' @description +#' This package provides a set of complete RStudio themes that restyle the +#' IDE and the editor syntax. The themes are built from +#' [sass](https://sass-lang.org) templates into `.rstheme` files that, +#' ultimately, contain the CSS files that provide the themes. The sass templates +#' provide an easy-to-extend framework for customizing the look of RStudio. If +#' you would like to create your own theme, [rstheme()] is designed to help you +#' get started quickly. +#' +#' @section Getting Started: +#' +#' - Would you like to install, try out, or remove RStudio themes from +#' \pkg{rsthemes}? Read more in [rsthemes-actions]. +#' +#' - Would you like to automatically choose a dark or light theme? Or would +#' you like to quickly toggle through a set of themes you enjoy? Read more +#' in [auto_theme]. +#' +#' - Would you like to create a new theme for RStudio? Read more in +#' [rstheme()]. +#' +#' @keywords internal +"_PACKAGE" + +## usethis namespace: start +## usethis namespace: end +NULL diff --git a/R/rsthemes.R b/R/rsthemes.R index c78f2be..c056fdc 100644 --- a/R/rsthemes.R +++ b/R/rsthemes.R @@ -1,12 +1,4 @@ -#' Full RStudio Themes -#' -#' This package provides a set of complete RStudio themes that restyle the -#' IDE and the editor syntax. The themes are built from -#' [sass](https://sass-lang.org) templates into `.rstheme` files that, -#' ultimately, contain the CSS files that provide the themes. The sass templates -#' provide an easy-to-extend framework for customizing the look of RStudio. If -#' you would like to create your own theme, [rstheme()] is designed to help you -#' get started quickly. +#' Install, List, Try or Remove RStudio Themes #' #' @section Palettes: \pkg{rsthemes} includes RStudio themes based on the #' following colors palettes. @@ -14,10 +6,10 @@ #' ```{r child="man/fragments/palettes.Rmd"} #' ``` #' -#' @name rsthemes +#' @name rsthemes-actions NULL -#' @describeIn rsthemes Install RStudio themes +#' @describeIn rsthemes-actions Install RStudio themes #' @param style Limit to a subgroup of themes, chosen from the options returned #' by [rsthemes_styles()]. #' @param include_base16 Should the `base16` themes be included? @@ -54,7 +46,7 @@ install_rsthemes <- function(style = "all", include_base16 = FALSE, destdir = NU cli::cli_alert_info("Use {.code rsthemes::try_rsthemes()} to try all installed themes") } -#' @describeIn rsthemes Remove rsthemes from RStudio +#' @describeIn rsthemes-actions Remove rsthemes from RStudio #' @export remove_rsthemes <- function(style = rsthemes_styles(), include_base16 = TRUE) { requires_rstudioapi() @@ -79,7 +71,7 @@ cli_how2install <- function() { ) } -#' @describeIn rsthemes List installed themes (default) or available themes +#' @describeIn rsthemes-actions List installed themes (default) or available themes #' @param list_installed Should the installed \pkg{rsthemes} themes be listed #' (default). If `FALSE`, the available themes in the \pkg{rsthemes} package #' are listed instead. @@ -134,7 +126,7 @@ list_pkg_rsthemes <- function(style = "all", include_base16 = TRUE) { theme_files } -#' @describeIn rsthemes Try each rsthemes RStudio theme +#' @describeIn rsthemes-actions Try each rsthemes RStudio theme #' @param delay Number of seconds to wait between themes. Set to 0 to be #' prompted to continue after each theme. #' @export @@ -172,7 +164,7 @@ try_rsthemes <- function( rstudioapi::applyTheme(current_theme$editor) } -#' @describeIn rsthemes List style options +#' @describeIn rsthemes-actions List style options #' @param validate If provided to `rsthemes_styles()`, checks that the #' specified style is valid. #' @param ... Ignored. diff --git a/man/rsthemes.Rd b/man/rsthemes-actions.Rd similarity index 87% rename from man/rsthemes.Rd rename to man/rsthemes-actions.Rd index a70ac4a..69613cd 100644 --- a/man/rsthemes.Rd +++ b/man/rsthemes-actions.Rd @@ -1,13 +1,13 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/rsthemes.R -\name{rsthemes} -\alias{rsthemes} +\name{rsthemes-actions} +\alias{rsthemes-actions} \alias{install_rsthemes} \alias{remove_rsthemes} \alias{list_rsthemes} \alias{try_rsthemes} \alias{rsthemes_styles} -\title{Full RStudio Themes} +\title{Install, List, Try or Remove RStudio Themes} \usage{ install_rsthemes(style = "all", include_base16 = FALSE, destdir = NULL) @@ -43,13 +43,7 @@ prompted to continue after each theme.} specified style is valid.} } \description{ -This package provides a set of complete RStudio themes that restyle the -IDE and the editor syntax. The themes are built from -\href{https://sass-lang.org}{sass} templates into \code{.rstheme} files that, -ultimately, contain the CSS files that provide the themes. The sass templates -provide an easy-to-extend framework for customizing the look of RStudio. If -you would like to create your own theme, \code{\link[=rstheme]{rstheme()}} is designed to help you -get started quickly. +Install, List, Try or Remove RStudio Themes } \section{Functions}{ \itemize{ diff --git a/man/rsthemes-package.Rd b/man/rsthemes-package.Rd new file mode 100644 index 0000000..5c6b715 --- /dev/null +++ b/man/rsthemes-package.Rd @@ -0,0 +1,42 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/rsthemes-package.R +\docType{package} +\name{rsthemes-package} +\alias{rsthemes} +\alias{rsthemes-package} +\title{rsthemes: Full Themes for RStudio v1.2+} +\description{ +This package provides a set of complete RStudio themes that restyle the +IDE and the editor syntax. The themes are built from +\href{https://sass-lang.org}{sass} templates into \code{.rstheme} files that, +ultimately, contain the CSS files that provide the themes. The sass templates +provide an easy-to-extend framework for customizing the look of RStudio. If +you would like to create your own theme, \code{\link[=rstheme]{rstheme()}} is designed to help you +get started quickly. +} +\section{Getting Started}{ + +\itemize{ +\item Would you like to install, try out, or remove RStudio themes from +\pkg{rsthemes}? Read more in \link{rsthemes-actions}. +\item Would you like to automatically choose a dark or light theme? Or would +you like to quickly toggle through a set of themes you enjoy? Read more +in \link{auto_theme}. +\item Would you like to create a new theme for RStudio? Read more in +\code{\link[=rstheme]{rstheme()}}. +} +} + +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/gadenbuie/rsthemes} + \item Report bugs at \url{https://github.com/gadenbuie/rsthemes/issues} +} + +} +\author{ +\strong{Maintainer}: Garrick Aden-Buie \email{garrick@adenbuie.com} + +} +\keyword{internal}