vladh / lein-sassy

Use Sass with Clojure.
Eclipse Public License 1.0
33 stars 7 forks source link

lein-sassy

Use Sass with Clojure.

lein-sassy is no longer maintained, and there are probably better alternatives out there.

Prerequisites

lein-sassy uses JRuby, so you need to have Ruby installed. You probably already do, though. JRuby is also why the plugin should only be used as a development dependency, since you would always depend on it otherwise.

Usage

Add the plugin to your project.clj, using the appropriate version:

(defproject narwhal-endearment-manager "0.1.0-SNAPSHOT"
  :plugins [[lein-sassy "version-from-below-goes-here"]])

Clojars Project

Then add the following, using your CSS folders as appropriate.

:sass {:src "resources/app/stylesheets"
       :dst "resources/public/stylesheets"}

Finally, run lein deps to download everything.

To compile files once, use lein sass once.

To watch files for changes, use lein sass watch.

To remove generated files, run lein sass clean.

Options

The sass section in project.clj takes various options:

Hooks

The following hooks are supported by lein-sassy:

$ lein compile
$ lein clean

To enable the hooks, add the following to your project.clj file:

:hooks [leiningen.sass]

What to do if it doesn't work

If you have any trouble using lein-sassy, especially if there are any Ruby issues, please open an issue. This helps me out a lot, as I can get feedback from people using various platforms in order to make lein-sassy better.

To do

Credits and License

This plugin was greatly inspired by lein-haml-sass and contains contributions from lein-sass.

Copyright Vlad-Ștefan Harbuz and distributed under the Eclipse Public License, the same as Clojure.