Compile SASS/SCSS to CSS using the sass.js library
sass.RdThis function uses the sass.js library to compile SASS/SCSS code into CSS. It leverages the QuickJSR package to run JavaScript code within R. Note that the first time this function is called, it will load the sass.js library into the JavaScript context, which may take a few seconds. Subsequent calls will be faster.
Usage
sass(input, options = list())Examples
scss_code <- "h1 { font-size: 40px; code { font-face: Roboto Mono; } }"
sass(scss_code, list(style = "compressed"))
#> $css
#> [1] "h1{font-size:40px}h1 code{font-face:Roboto Mono}"
#>
#> $loadedUrls
#> logical(0)
#>