Michał Wojciechowski > Dancer-Plugin-Preprocess-Sass > Dancer::Plugin::Preprocess::Sass

Download:
Dancer-Plugin-Preprocess-Sass-0.031.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.031   Source  

NAME ^

Dancer::Plugin::Preprocess::Sass - Generate CSS files from Sass/SCSS files

VERSION ^

version 0.031

SYNOPSIS ^

Dancer::Plugin::Preprocess::Sass adds support for Sass/SCSS files in a Dancer web application.

Add the plugin to your application:

    use Dancer::Plugin::Preprocess::Sass;

Configure its settings in the YAML configuration file:

    plugins:
      "Preprocess::Sass":
        save: 1
        paths:
          - css
          - subdir/css

DESCRIPTION ^

Dancer::Plugin::Preprocess::Sass adds support for Sass/SCSS files in a Dancer web application.

When a request is received for a CSS file, the plugin looks for a Sass/SCSS file with the same name, and transforms it into CSS. The generated CSS file may then be saved and served as a regular static file. Every time the source Sass/SCSS file gets modified, the corresponding CSS file is regenerated.

CONFIGURATION ^

The available configuration settings are described below.

save

If set to 0, then the CSS files are generated on-the-fly with every request. If set to 1, the files are generated once and saved, then served as static files later on.

CSS files are saved in the same directory as the Sass/SCSS files, so the system user that the web application is running as must be allowed to write to that directory.

Default: 0

paths

A list of paths to serve CSS files from. Each path is relative to the public directory of the application.

    plugins:
      "Preprocess::Sass":
        paths:
          - css
          - subdir/css

Default: 'css'

SEE ALSO ^

* http://sass-lang.com/ - Sass website

ACKNOWLEDGEMENTS ^

The plugin uses Roger Pettett's Text::Sass module.

SUPPORT ^

Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker at https://github.com/odyniec/p5-Dancer-Plugin-Preprocess-Sass/issues. You will be notified automatically of any progress on your issue.

Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

https://github.com/odyniec/p5-Dancer-Plugin-Preprocess-Sass

  git clone https://github.com/odyniec/p5-Dancer-Plugin-Preprocess-Sass.git

AUTHOR ^

Michal Wojciechowski <odyniec@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2011 by Michal Wojciechowski.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: