Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stla/prettifyAddins
RStudio addins to prettify JavaScript/HTML/CSS/Markdown/C++ and more.
https://github.com/stla/prettifyAddins
prettifier r rstudio-addins shiny
Last synced: 12 days ago
JSON representation
RStudio addins to prettify JavaScript/HTML/CSS/Markdown/C++ and more.
- Host: GitHub
- URL: https://github.com/stla/prettifyAddins
- Owner: stla
- License: other
- Created: 2020-09-11T21:22:39.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-09-14T09:29:40.000Z (about 1 year ago)
- Last Synced: 2024-10-06T13:07:47.124Z (about 1 month ago)
- Topics: prettifier, r, rstudio-addins, shiny
- Language: JavaScript
- Homepage:
- Size: 2.06 MB
- Stars: 21
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.note
Awesome Lists containing this project
- jimsghstars - stla/prettifyAddins - RStudio addins to prettify JavaScript/HTML/CSS/Markdown/C++ and more. (JavaScript)
README
# **prettifyAddins**
[![R-CMD-check](https://github.com/stla/prettifyAddins/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/stla/prettifyAddins/actions/workflows/R-CMD-check.yaml)
### RStudio addins to prettify JavaScript / HTML / CSS / Markdown / C++ and more.
**JavaScript example:**
![](https://raw.githubusercontent.com/stla/prettifyAddins/master/inst/screenshots/prettifyAddins_js.gif)
The **Markdown** prettifier also prettifies the code blocks:
![](https://raw.githubusercontent.com/stla/prettifyAddins/master/inst/screenshots/prettifyAddins_md.gif)
## NEWS
- As of **version 1.0.0**, there are six addins:
![](https://raw.githubusercontent.com/stla/prettifyAddins/master/inst/screenshots/addins_1-0-0.png)
The 'shiny' addins are the ones you can see on the above GIFs. The other ones
are not interactive. The *'Prettify C/C++/Java'* addin requires `clang-format`
(it is possible to reindent C/C++/Java (and more) with the *'Indent (shiny)'*
addin).- As of **version 2.0.0**, there are five new addins:
- *'Indent (PhantomJS)':* allows to reindent code for some languages which
were supported by the *'Indent (shiny)'* addin only, whereas this addin does
not run a Shiny app; these languages are C, C++, Java, Fortran, Julia, Python,
SAS, Scala, Shell, and SQL. This addin requires `phantomjs` (the package
provides a function to install this software).
- *'Prettify LaTeX':* to prettify LaTeX code; works for Sweave code. It
requires `latexindent`, which is included in MikTeX and TeX Live
distributions.
- *'Prettify Julia':* to prettify Julia code. It requires Julia.
- *'Prettify Python':* to prettify Python code. It requires
[black](https://github.com/psf/black).
- *'Prettify (formatCodeApi)':* to prettify Java, JSON, and Ruby.Moreover, this version exports the functions used to prettify/reindent.
For example:```r
code <- c(
"function f(x){",
"return x+1",
"}"
)
cat(prettify_V8(code, "javascript"))
```
gives
```js
function f(x) {
return x + 1;
}
```___
# __Copies of license agreements__
The 'prettifyAddins' package as a whole is distributed under GPL-3 (GNU
GENERAL PUBLIC LICENSE version 3).It includes other open source software components:
- **Prettier**, https://github.com/prettier/prettier
- **indent.js**, https://github.com/zebzhao/indent.js
- **CodeMirror**, https://github.com/codemirror/CodeMirror
- **SQL Formatter**, https://github.com/zeroturnaround/sql-formatter
- **Prettydiff**, https://github.com/prettydiff/prettydiffFull copies of the license agreements used by these components are included
in the file [LICENSE.note](https://github.com/stla/prettifyAddins/blob/master/LICENSE.note).