Skip to content

Commit

Permalink
Merge pull request #29 from davidruvolo51/fix/cran-tests
Browse files Browse the repository at this point in the history
rheroicons v0.4.0
  • Loading branch information
davidruvolo51 authored Jul 16, 2022
2 parents 446116f + 36ac5e3 commit cfc5257
Show file tree
Hide file tree
Showing 20 changed files with 6,235 additions and 4,092 deletions.
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
^renv$
^renv\.lock$
^node_modules$
^inst/rheroicons-gallery/rsconnect$
^yarn-error\.log$
Expand All @@ -17,3 +19,5 @@
^LICENSE\.md$
^CRAN-RELEASE$
^pnpm-lock\.yaml$
^\.lintr$
^\.Rprofile$
72 changes: 72 additions & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#' ////////////////////////////////////////////////////////////////////////////
#' FILE: .Rprofile
#' AUTHOR: David Ruvolo
#' CREATED: 2021-07-29
#' MODIFIED: 2021-07-29
#' PURPOSE: workspace configurations and useful functions for vscode+R env
#' STATUS: working; ongoing
#' PACKAGES: NA
#' COMMENTS: https://github.com/davidruvolo51/rprofile
#' ////////////////////////////////////////////////////////////////////////////

# set options
options(

# options: shiny
shiny.port = 8000,
shiny.launch.browser = FALSE,

# options: radian
radian.insert_new_line = FALSE,
radian.prompt = "\033[0;34m>\033[0m ",

# options: vscode R
vsc.use_httpgd = TRUE,
vsc.helpPanel = "Beside",
vsc.viewer = "Beside",
vsc.browser = "Beside",
vsc.show_object_size = FALSE,

# options: languageserver
languageserver.formatting_style = function(options) {
styler::tidyverse_style(
start_comments_with_one_space = TRUE,
indent_by = 4
)
}
)


#' @title Clear
#' @name clear
#' @description clear the active terminal
#' @noRD
clear <- function() {
cmds <- list("unix" = "clear", "windows" = "cls")
system(cmds[[.Platform$OS.type]])
}


#' @title Quietly Load Package
#' @name library2
#' @description suppress messages when loading a package
#' @param pkg the name of the package
#' @noRd
library2 <- function(pkg) {
suppressPackageStartupMessages(library(pkg, character.only = TRUE))
}


#' @title Remove2
#' @name rm2
#' @description Force remove all objects from the current environment
#' @param except optional an array of object names to ignore
#' @noRd
rm2 <- function(except = NULL) {
ignore <- c("clear", "library2", "rm2")
if (!is.null(except)) ignore <- c(ignore, except)
rm(list = setdiff(ls(envir = .GlobalEnv), ignore), envir = .GlobalEnv)
}

# start renv: make sure this is always last!
source("renv/activate.R")
4 changes: 4 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
linters: with_defaults(line_length_linter = line_length_linter(87), commented_code_linter = NULL, object_usage_linter=NULL, object_name_linter=NULL)
exclusions: list("renv/")
exclude_start: "# nolint start"
exclude_end: "# nolint end"
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rheroicons
Title: A Zero Dependency 'SVG' Icon Library for 'Shiny'
Version: 0.3.2
Version: 0.4.0
Authors@R: c(
person(
given = "David",
Expand All @@ -25,9 +25,9 @@ Description: An implementation of the 'Heroicons' icon library for 'shiny'
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
RoxygenNote: 7.2.0
Imports:
htmltools (>= 0.5.0),
htmltools (>= 0.5.2),
shiny (>= 1.5.0),
stringr
Suggests:
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# rheroicons 0.4.0

* Upgraded to Heroicons `v1.0.6` (released on 02 March 2022) that includes new icons and updates to existing ones.
* Improved error handling in the function `rheroicon`. Missing values or incorrect values throw a warning message rather than stopping the application. This allows the application to continue to run while you test different icons.

# rheroicons 0.3.2

* Upgraded to Heroicons `v1.0` (released on 29 March 2021). This brings fixes to several icons.
Expand Down
2 changes: 1 addition & 1 deletion R/find_icon.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
#'
#' @export
find_icons <- function(query = "") {
stringr::str_subset(string = names(rheroicons), pattern = query)
stringr::str_subset(string = names(rheroicons), pattern = query)
}
Loading

0 comments on commit cfc5257

Please sign in to comment.