diff --git a/.Rbuildignore b/.Rbuildignore index cbf4dd311..48239634b 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -17,8 +17,11 @@ ^doc$ ^docs$ ^gitsum$ +^hextools ^inst/WORDLIST$ +^inst/hextools$ ^inst/hooks/.*$ +^pkgdown$ ^revdep$ ^tests/testmanual$ ^tic\.R$ diff --git a/.gitignore b/.gitignore index 930a72e86..e0d2606ed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,11 @@ +.DS_Store .RData .Rhistory .Rproj.user .gitsum Meta R/scratch +README.html doc docs gitsum diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d6dd581fa..869a3ef8a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ default_language_version: repos: - repo: https://github.com/lorenzwalthert/precommit - rev: v0.3.2.9019 + rev: v0.3.2.9027 hooks: - id: style-files args: @@ -34,9 +34,9 @@ repos: - id: roxygenize additional_dependencies: - r-lib/pkgapi - - dplyr@1.1.2 - - roxygen2@7.2.3 - - rlang@1.1.0 + - dplyr + - roxygen2 + - rlang - id: use-tidy-description - id: spell-check exclude: > @@ -62,6 +62,7 @@ repos: .*\.Rds| .*\.sh| .*\.RData| + .*\.png| .*-in_tree )$ - id: readme-rmd-rendered diff --git a/DESCRIPTION b/DESCRIPTION index e38798e39..347545ef1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -52,7 +52,7 @@ Roxygen: list(markdown = TRUE, roclets = c( "rd", "namespace", "collate", if (rlang::is_installed("pkgapi")) "pkgapi::api_roclet" else { warning("Please install r-lib/pkgapi to make sure the file API is kept up to date"); NULL})) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.0 Config/testthat/edition: 3 Config/testthat/parallel: true Collate: diff --git a/R/styler-package.R b/R/styler-package.R index c1558ef4e..2a688583d 100644 --- a/R/styler-package.R +++ b/R/styler-package.R @@ -18,14 +18,15 @@ #' style_text("a%>%b; a", scope = "tokens") "_PACKAGE" -## usethis namespace: start +## styler namespace: start #' -#' @importFrom magrittr "%>%" +#' @importFrom magrittr %>% #' @importFrom purrr compact partial flatten flatten_int flatten_chr #' @importFrom purrr map map_lgl map_int map_chr map2 map2_chr map_at pmap pwalk -#' @importFrom rlang abort warn seq2 check_installed is_installed "%||%" set_names +#' @importFrom rlang abort warn seq2 check_installed is_installed %||% set_names #' @importFrom vctrs vec_rbind vec_slice vec_split -## usethis namespace: end +#' +## styler namespace: end NULL diff --git a/R/transform-files.R b/R/transform-files.R index c49c54cc6..a4717e015 100644 --- a/R/transform-files.R +++ b/R/transform-files.R @@ -68,12 +68,10 @@ transform_file <- function(path, bullet <- if (is.na(changed)) { "warning" + } else if (changed) { + "info" } else { - if (changed) { - "info" - } else { - "tick" - } + "tick" } if (!getOption("styler.quiet", FALSE)) { diff --git a/README.Rmd b/README.Rmd index 314230e53..3216f2a10 100644 --- a/README.Rmd +++ b/README.Rmd @@ -15,7 +15,7 @@ knitr::opts_chunk$set( ) ``` -# styler +# styler @@ -68,3 +68,9 @@ The following online docs are available: - [latest CRAN release](https://styler.r-lib.org). - [GitHub development version](https://styler.r-lib.org/dev/). + +## Acknowledgments + +Hex sticker font is [Gayathri](https://fonts.google.com/specimen/Gayathri), and +the image is taken from icon made by [Freepik](https://www.freepik.com) and +available at [flaticon.com](https://www.flaticon.com/free-icon/suit). diff --git a/README.md b/README.md index dd25e5930..c466344cc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# styler +# styler @@ -53,3 +53,10 @@ The following online docs are available: - [latest CRAN release](https://styler.r-lib.org). - [GitHub development version](https://styler.r-lib.org/dev/). + +## Acknowledgments + +Hex sticker font is +[Gayathri](https://fonts.google.com/specimen/Gayathri), and the image is +taken from icon made by [Freepik](https://www.freepik.com) and available +at [flaticon.com](https://www.flaticon.com/free-icon/suit). diff --git a/inst/WORDLIST b/inst/WORDLIST index 9302ce870..438af60a2 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -1,24 +1,21 @@ -addin Addin +addin addins -Addins api AppVeyor -apriori arg -AsIs +args AST aut -autothresholdr backport +backports bdr benchmarking -biocthis bootswatch BugReports +bXj cancelling cff -chnages ci cli CMD @@ -29,72 +26,58 @@ coercible coercions compat config -CONST +Config counterpair coventions -covr cpp -cran cre ctb cyclocomp cynkra -datastructures dec dependabot -deps desc -dev devtools dir +dirs docsearch dont dontrun dontshow -dontshowdontrun donttest dplyr DSLs emacs -emph -env EOF EOL EOLs -epigraphdb -eq EQ -eval examplesIf -exampletestr expr -expr EQ +eZm fansi -fileext +Fi filetype +Fjmav +flaticon forcond formatter -funct +Freepik gadenbuie -gcc -getChecksum +Gayathri getOption -getRversion ggplot -ghclass github +Github gitsum gmail grkstyle GSOC -hashFiles helpfiles href -http https icloud ifelse -impl Indrajeet infinitively initializer @@ -103,69 +86,57 @@ integrations interaces internal's invasiveness -iNZightTools +Invasiveness io ixmypi -ized JamesIves +JBP Jupyterlab -Kirill kirill +Kirill knitr krlmlr labelled -languageserver -LazyData learnr -levelName LF -LIBS lifecycle -Ligges linter linters lintr -linux lorenz lorenzwalthert -lst macOS magrittr +mav md MERCHANTABILITY mlr -Müller mutli -na +Müller navbar +nbv netlify -netReg nocomments NONINFRINGEMENT nonportable -nph -NUM nzchar -oldrel +ocx oneliner ORCID -os ourself -packagemanager packrat pandoc params -paren parsable parsesum Patil patilindrajeet patilindrajeets -pgkdown +pdy +PGW pkgapi pkgconfig pkgdown -pkgs pos pre precommit @@ -174,13 +145,10 @@ prettycode priori PRs purrr +qez qmd Qmd -questionr -rcmdcheck RcppExports -rds -readline readme README rebased @@ -192,10 +160,10 @@ renv repo reprex revdepcheck -RHUB rlang rlang's rmarkdown +Rmarkdown RMarkdown rmd Rmd @@ -204,109 +172,72 @@ Rnw roadmap roclet roclets -rootPath -ROOTPATH ropensci -roundtrip roxgen roxygen Roxygen -roxygenise RoxygenNote rplumber rprofile Rprofile rprojroot -Rscript -rspm -RSPM -rstudio RStudio RStudio's rstudioapi saamwerk -saveRDS -seealso +Sd semicoloner -sep -sessioninfo -setCacheRootPath -setdiff -setenv Shallowify sharding -shinydashboardPlus -shinymeta -shinyMonacoEditor -shinyobjects -ShinyQuickStarter spaceout -sprintf -stackoverflow StackOverflow -startsWith -staticimports -STR styler stylerignore stylerignored -stylers -subexpr sublicense -sudo summarises -Sys -sysreq -sysreqs -systemPipeShiny -tempfile testthat +tg +th tibble tibbles -tidyeval -tidypaleo tidyr tidyverse -Tidyverse -Tierney todo -tokenized travis -tryCatch -tryGugus ubuntu +Uf ui uncached unexplainable unicode unindent +Unindent unindention unlink -unlinkunindention unnest -unparsable -unstyled -upsetjs -usethis utf -Uwe vctrs vec +Vh VignetteBuilder Visit'em walthert Walthert -wch winbuilder withr -writeLines +WN www xaringan -xenial xfun Xie -xyzpackage -YAML +xk +XN yaml +YAML yihui +Yihui +yl +YPa +zm zzz diff --git a/inst/hextools/hexsticker.R b/inst/hextools/hexsticker.R new file mode 100644 index 000000000..ccf0dcdcc --- /dev/null +++ b/inst/hextools/hexsticker.R @@ -0,0 +1,48 @@ +library(hexSticker) +library(magick) +library(showtext) +library(sysfonts) + +# Loading Google fonts (http://www.google.com/fonts) +google_font_name <- "Gayathri" +font_add_google(google_font_name) + +# Automatically use showtext to render text for future devices +showtext_auto() + +project_root <- here::here() + +# https://www.flaticon.com/free-icon/suit_1355137 +image <- image_read(file.path(project_root, "hextools", "suit.png")) +manual_logo_path <- file.path(project_root, "man", "figures", "logo.png") +color_font <- "#b3c9e5" + +sticker( + # image + subplot = image, + s_x = 1.1, + s_y = 1, + s_width = 1, + s_height = 1.2, + # package name + package = "styler", + p_color = color_font, + p_family = google_font_name, + p_size = 58, + p_x = 0.35, + p_y = 0.95, + angle = 90, + # image + h_color = "black", + h_fill = "#a18595", + # package URL + url = " https://styler.r-lib.org/", + u_size = 10, + u_color = color_font, + # saving sticker + filename = manual_logo_path, + dpi = 600, +) + + +rmarkdown::render("README.Rmd") diff --git a/inst/hextools/suit.png b/inst/hextools/suit.png new file mode 100644 index 000000000..cd8247998 Binary files /dev/null and b/inst/hextools/suit.png differ diff --git a/man/figures/logo.png b/man/figures/logo.png new file mode 100644 index 000000000..6fc364c18 Binary files /dev/null and b/man/figures/logo.png differ diff --git a/pkgdown/favicon/apple-touch-icon-120x120.png b/pkgdown/favicon/apple-touch-icon-120x120.png new file mode 100644 index 000000000..5782ba091 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-120x120.png differ diff --git a/pkgdown/favicon/apple-touch-icon-152x152.png b/pkgdown/favicon/apple-touch-icon-152x152.png new file mode 100644 index 000000000..a6c8b9bf1 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-152x152.png differ diff --git a/pkgdown/favicon/apple-touch-icon-180x180.png b/pkgdown/favicon/apple-touch-icon-180x180.png new file mode 100644 index 000000000..2eab20465 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-180x180.png differ diff --git a/pkgdown/favicon/apple-touch-icon-60x60.png b/pkgdown/favicon/apple-touch-icon-60x60.png new file mode 100644 index 000000000..c8d3dcae2 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-60x60.png differ diff --git a/pkgdown/favicon/apple-touch-icon-76x76.png b/pkgdown/favicon/apple-touch-icon-76x76.png new file mode 100644 index 000000000..74a370a6b Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-76x76.png differ diff --git a/pkgdown/favicon/apple-touch-icon.png b/pkgdown/favicon/apple-touch-icon.png new file mode 100644 index 000000000..f58f4c9dc Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon.png differ diff --git a/pkgdown/favicon/favicon-16x16.png b/pkgdown/favicon/favicon-16x16.png new file mode 100644 index 000000000..76ed5d813 Binary files /dev/null and b/pkgdown/favicon/favicon-16x16.png differ diff --git a/pkgdown/favicon/favicon-32x32.png b/pkgdown/favicon/favicon-32x32.png new file mode 100644 index 000000000..129ac242c Binary files /dev/null and b/pkgdown/favicon/favicon-32x32.png differ diff --git a/pkgdown/favicon/favicon.ico b/pkgdown/favicon/favicon.ico new file mode 100644 index 000000000..702c207bc Binary files /dev/null and b/pkgdown/favicon/favicon.ico differ