Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

output_template

An intelligent (temporary) output file


Description

Intended for use with sass()'s output argument for temporary file generation that is cache and options aware. In particular, this ensures that new redundant file(s) aren't generated on a sass() cache hit, and that the file's extension is suitable for the sass_options()'s output_style.

Usage

output_template(basename = "sass", dirname = basename, fileext = NULL)

Arguments

basename

a non-empty character vector giving the outfile name (without the extension).

dirname

a non-empty character vector giving the initial part of the directory name.

fileext

the output file extension. The default is ".min.css" for compressed and compact output styles; otherwise, its ".css".

Value

A function with two arguments: options and suffix. When called inside sass() with caching enabled, the caching key is supplied to suffix.

Examples

sass("body {color: red}", output = output_template())

func <- output_template(basename = "foo", dirname = "bar-")
func(suffix = "baz")

sass

Syntactically Awesome Style Sheets ('Sass')

v0.3.1
MIT + file LICENSE
Authors
Joe Cheng [aut], Timothy Mastny [aut], Richard Iannone [aut] (<https://orcid.org/0000-0003-3925-190X>), Barret Schloerke [aut] (<https://orcid.org/0000-0001-9986-114X>), Carson Sievert [aut, cre] (<https://orcid.org/0000-0002-4958-2844>), RStudio [cph, fnd], Sass Open Source Foundation [ctb, cph] (LibSass library), Greter Marcel [ctb, cph] (LibSass library), Mifsud Michael [ctb, cph] (LibSass library), Hampton Catlin [ctb, cph] (LibSass library), Natalie Weizenbaum [ctb, cph] (LibSass library), Chris Eppstein [ctb, cph] (LibSass library), Adams Joseph [ctb, cph] (json.cpp), Trifunovic Nemanja [ctb, cph] (utf8.h)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.