The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Basic how to package

Jonas Vaclavek

2019-07-31

While developing web applications, CSS is used to style web application’s web pages. The CSS is often written using CSS preprocessor such as SASS or LESS.

rless is a package, which helps to convert LESS files to CSS files within R environment.

This documentation is divided into three sections:

rless functions

parse_less

The parse_less function is a core function of the package. It takes LESS content and converts it to CSS.

convert_file

Passing text into parse_less function is suitable for small chunks. However, for more complex codes, it is more convenient to write LESS file separately and convert the file using convert_file function. It requires two parameters:

The converted file will be stored in tempdir folder or use output_folder argument to set different output location.

The function returns full path to the converted.

convert_folder

When having multiple LESS files, one can use rless function convert_folder. The function requires only input folder to be specified. It goes through the folder and converts all files matching a pattern (*.less by default) into CSS files. tempdir folder is used again as a default output location.

The function allows to specify optional argument:

List of paths to converted files is returned.

LESS

The following sections introduce the basic concepts of LESS with a use of rless function parse_less. More information about LESS features can be found here.

Using in Shiny apps

One of the typical ways of creating web applications in R is using Shiny. This sections shows how easy is to combine it with our rless package.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.