sassed.sass

Thin wrapper for libsass in D Programming Language. It can:

  1. Compile received string to css and return resulting css code
  2. Compile single file and put it to a specified folder
  3. Compile whole folder to multiple files and put it to another folder
  4. Compile whole folder to a single file
  5. Compile from .sass and .scss files
  6. Watch input folder and recompile files within output when user changing some of them

Usage:

// Creating new Sass object
auto sass = new shared Sass;

// Setting some options
sass.options.style = SassStyle.COMPRESSED;
sass.options.sourcemap.enable();

// Using one of compiling methods
sass.compileFile( "path/to/file.scss", "path/to/result.css" );

Members

Aliases

CompileErrorHandler
alias CompileErrorHandler = bool delegate(SassCompileException)

Watcher inner compile error handler type

CompileSuccessHandler
alias CompileSuccessHandler = void delegate(string input, string output)
Undocumented in source.

Classes

Sass
class Sass

SASS main implementation. Contains:

  1. Different compiling methods:
    1. compile. Simple string-to-string method
    2. compileFile. File compiling method
    3. compileFolder. Folder compiling method
    4. watchDir. Recompiling on change method
  2. Option specifier. It allows configuring SASS as needed
  3. SASS to SCSS converter. It allows implicit conversion from SASS code to CSS through the interjacent conversion to SCSS
SassCompileException
class SassCompileException

SASS code compilation exception

SassException
class SassException

SASS root exception

SassRuntimeException
class SassRuntimeException

SASS runtime exception not connected to code compilation error

Enums

PrettifyLevel
enum PrettifyLevel

Sass2scss libsass plugin option specifier. It consists of:

  1. Write everything on one line (minimized)
  2. Add lf after opening bracket (lisp style)
  3. Add lf after opening and before closing bracket (1TBS style)
  4. Add lf before/after opening and before closing (allman style)

More information can be found in the https://github.com/mgreter/sass2scss, official documentation.

SassStyle
enum SassStyle

Style options specifier. All styles are defined at http://sass-lang.com/documentation/file.SASS_REFERENCE.html#output_style, Sass Documentation. By now libsass implements only nested and compressed styles.

Meta

Authors

Vlad Rindevich (rindevich.vs@gmail.com).