CSS::Sass

Compile .scss and .sass files using libsass

CSS::Sass provides a perl interface to libsass, a fairly complete Sass compiler written in C++. It is currently around ruby sass 3.3/3.4 feature parity and heading towards full 3.4 compatibility. It can compile .scss and .sass files.

Installation

Build Status Coverage Status CPAN version

Manual installation:

  git clone https://github.com/sass/libsass
  cd libsass
  perl Makefile.PL
  make verbose=1
  make test verbose=1
  make install verbose=1

Standard CPAN:

  cpan CSS::Sass

CPAN-Minus*:

  cpanm CSS::Sass

CPAN-Minus* directly via github:

  cpanm https://github.com/sass/perl-libsass/archive/latest.tar.gz

(*) CPAN-Minus may not be installed by default, but there is a good chance your distribution has a package for it:

  # example for ubuntu:
  apt install cpanminus

On windows I recommend Strawberry Perl. You then also need to use dmake instead of make for manual installs.

Documentation

Before installing:

perldoc lib/CSS/Sass.pm

After installing:

man CSS::Sass

Or view converted markdown version

Command line utility

psass [options] [ path_in | - ] [ path_out | - ]
-v, --version                 print version
-h, --help                    print this help
-w, --watch                   start watchdog mode
-p, --precision               precision for float output
-o, --output-file=file        output file to write result to
-t, --output-style=style      output style [nested|compressed]
-L, --plugin-path=path        plugin load path (repeatable)
-I, --include-path=path       sass include path (repeatable)
-c, --source-comments         enable source debug comments
-e, --source-map-embed        embed source-map in mapping url
-s, --source-map-contents     include original contents
-m, --source-map-file=file    create and write source-map to file
    --no-source-map-url       omit sourceMappingUrl from output

Copyright © 2013-2014 by David Caldwell
Copyright © 2014-2016 by Marcel Greter

This library is released under the MIT license.