Popularity
6.5
Growing
Activity
0.0
Stable
35
4
3

Programming language: Crystal
License: MIT License
Tags: Converters    
Latest version: v0.5.0

sass.cr alternatives and similar shards

Based on the "Converters" category.
Alternatively, view sass.cr alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of sass.cr or a related project?

Add another 'Converters' Shard

README

sass.cr

Build Status Dependency Status devDependency Status

sass.cr provides a Sass/SCSS to CSS compiler for Crystal through bindings to libsass.

API Documentation · GitHub Repo

Installation

Add this to your application's shard.yml:

dependencies:
  sass:
    github: straight-shoota/sass.cr

Installing libsass

This shard requires the libsass library. It is available in many package managers as libsass-dev or libsass.

If you can't find a binary distribution of libsass, you need to build it yourself (see Building instructions for libsass).

The included Makefile contains a target install-libsass to install libsass in a global path (usually /usr/local/lib). You can also run make dep to install libsass in a local path specified by $LOCAL_LD_PATH (by default this is ./dynlib).

These bindings have been tested with version 3.4.5 and 3.5.0.beta.3 of libsass.

Usage

require "sass"

# Compile a Sass/SCSS file:
css = Sass.compile_file("application.scss")

# Compile a Sass/SCSS file with options:
css = Sass.compile_file("application.sass", include_path: "includes")

# Compile a Sass/SCSS string:
css = Sass.compile("body { div { color: red; } }")

# Re-use compiler with options:
compiler = Sass.new(include_path: "includes", precision: 4)
compiler.include_path += ":other_includes"
css_application = compiler.compile_file("application.scss")
css_layout = compiler.compile(%(@import "layout";))

Contributing

  1. Fork it ( https://github.com/straight-shoota/sass.cr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors