Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lorenzwalthert/styler.yours
A template repository for creating third-party style guides for {styler}
https://github.com/lorenzwalthert/styler.yours
Last synced: about 1 month ago
JSON representation
A template repository for creating third-party style guides for {styler}
- Host: GitHub
- URL: https://github.com/lorenzwalthert/styler.yours
- Owner: lorenzwalthert
- License: mit
- Created: 2021-10-29T11:27:03.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-05T10:00:05.000Z (about 1 month ago)
- Last Synced: 2024-11-05T11:17:27.203Z (about 1 month ago)
- Language: R
- Size: 95.7 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - lorenzwalthert/styler.yours - A template repository for creating third-party style guides for {styler} (R)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# styler.putyourstyleguidehere
This is a GitHub template to create and distribute a custom {styler} style
guide. For more info, see the [{styler} documentation](https://styler.r-lib.org/dev/articles/distribute_custom_style_guides.html). You can use this template to create a GitHub repo by pressing the green
button:```{r, out.width = 500, echo = FALSE}
knitr::include_graphics("https://raw.githubusercontent.com/lorenzwalthert/some_raw_data/master/styler.yours.png")
```Here's what you have to do once you created your repo from the template.
* search for `putyourstyleguidehere_style` and replace it with the name
of your style guide.
* Adapt the authors field in `DESCRIPTION`.* In `create_style_guide()`, ensure the `style_guide_name` matches the expected
format, e.g. styler has `"styler::tidyverse_style@https://github.com/r-lib"`.
See `help(create_style_guide, package = "styler")` for details.
* adapt the function `putyourstyleguidehere_style()` (the drop-in for
`styler::tidyverse_style`) such that it does what you want. Currently, all
the style guide is doing is to replace `<-` with `=`
* add tests.
* remove all of the above instructions.[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/putyourstyleguidehere/styler.putyourstyleguidehere/workflows/R-CMD-check/badge.svg)](https://github.com/putyourstyleguidehere/styler.putyourstyleguidehere/actions)The goal of {styler.putyourstyleguidehere} is... It is a third-party
style guide for [{styler}](https://styler.r-lib.org).## Installation
You can install the released version of {styler.putyourstyleguidehere} from [GitHub](https://github.com) with:
``` r
remotes::install_github("putyourstyleguidehere/styler.putyourstyleguidehere")
```## Example
This is a basic example of how to style code with it.
```{r example, eval = FALSE}
library(styler.putyourstyleguidehere)
cache_deactivate()
text <- "x <- 4
y = 3
a;
"style_text(text)
```