Giter Site home page Giter Site logo

lein-sassc's Introduction

lein-sassc

Leiningen plugin to compile SASS/SCSS files with SassC.

Installation

(defproject example "1.0.0"
  :plugins [[lein-sassc "0.10.4"]])

Make sure you have a sassc command.

Configuration

The configuration for sassc is specified under the :sassc sections of your project.clj.

(defproject example "1.0.0"
  :sassc [{:src          "src/scss/page1.scss" ;; default "src/scss/main.scss"
           :output-to    "dist/page1.css"      ;; default "target/sassc/main.css"
           :style        "compressed"          ;; "nested" or "compressed", default "nested"
           :import-path  "src/scss"}           ;; default "src/scss"
          {:src       "src/scss/page2.scss"
           :output-to "dist/page2.css"}}])

The above configuration run the following commands.

$ sassc -t compressed -I src/scss src/scss/page1.scss dist/page1.css
$ sassc -t nested -I src/scss src/scss/page2.scss dist/page2.css

Multiple source paths may be specified by setting :import-path to a vector:

(defproject example "1.0.0"
  :sassc [{:src          "src/scss/page1.scss"       ;; default "src/scss/main.scss"
           :output-to    "dist/page1.css"            ;; default "target/sassc/main.css"
           :style        "compressed"                ;; "nested" or "compressed", default "nested"
           :import-path  ["src/scss" "other/scss"]}  ;; default "src/scss"
          {:src       "src/scss/page2.scss"
           :output-to "dist/page2.css"}}])

The above configuration results in the following commands:

$ sassc -t compressed -I src/scss -I other/scss src/scss/page1.scss dist/page1.css
$ sassc -t nested -I src/scss -I other/scss src/scss/page2.scss dist/page2.css

Usage

Compile your files once:

$ lein sassc once

To delete all the files generated by lein-sassc

$ lein sassc clean

Hooks

The following hooks are supported by lein-sassc:

$ lein compile
$ lein clean

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

:hooks [leiningen.sassc]

License

Copyright (C) 2014 [email protected]

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

lein-sassc's People

Watchers

Andrew Baxter 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.