GithubHelp home page GithubHelp logo

lein-sass's Introduction

lein-sass Build Status

Leiningen plugin to compile SASS/SCSS files with SassC or Sass.

Clojars Project

Installation

You can install the plugin by adding lein-sass to your project.clj file in the plugins section:

(defproject example "1.0.0"
  :plugins [[lein-sass "0.4.0"]])

SassC needs to be installed manually. For example on OSX run brew install sassc.

To install SassC on Ubuntu (should similarly apply to other Unixes) I usually follow this recipe: http://askubuntu.com/questions/566675/how-to-install-node-sass-gulp-sass-on-ubuntu-14-04-or-linux-mint-17/566681#566681

Alternatively you can use sass to compile your sass or scss files. This needs to be installed as well, but the process might be straight forward. Please see http://sass-lang.com/install for install instructions.

On a Linux system you can just run sudo gem install sass (provided a decent Ruby runtime is installed).

Configuration

Here is an example of project.clj with all the possible definitions.

(defproject example-project "1.2.3"

  :sass {:src "resources/sass"
         :output-directory "resources/public/css"

         ;; other options (provided are default values):
         ;; :delete-output-dir true
         ;; :source-maps true
         ;; :style :nested
         ;; :command :sassc (:sass or :sassc are recognized values)
         }

Usage

To compile your files once:

$ lein sass once

To keep the compiler running and watch for changes:

$ lein sass auto

To delete all the files generated by lein-sass

$ lein sass clean

Hooks

The following hooks are supported by lein-sass:

$ lein compile
$ lein clean

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

:hooks [leiningen.sass]

License

Copyright (C) 2013 Renaud Tircher, 2014 Stephan Behnke

Distributed under the Eclipse Public License, the same as Clojure.

lein-sass's People

Contributors

akiellor avatar boxed avatar manicolosi avatar olimsaidov avatar rkaercher avatar rtircher avatar stephanos avatar tuhlmann avatar visibletrap avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.