Crates.io | sass-sys |
lib.rs | sass-sys |
version | 0.4.22 |
source | src |
created_at | 2015-02-03 06:13:50.725044 |
updated_at | 2021-06-01 20:34:53.78543 |
description | Low level binding for the Sass library |
homepage | https://github.com/compass-rs/sass-rs |
repository | https://github.com/compass-rs/sass-rs.git |
max_upload_size | |
id | 1337 |
size | 1,639,161 |
This crate is a wrapper around libsass, currently tracking v3.6.4.
To build this crate on Windows, you will need to have Visual Studio installed.
You can control the number of CPU used to build libsass
by setting the MAKE_LIBSASS_JOBS
variable to the desired value. It defaults to the number of CPUs in the machine.
This package also provides a small binary that can be cargo install
ed to convert Sass files and print the output CSS.
Example usage:
$ sass-rs < source/style.scss # for SCSS
$ sass-rs --sass < source/style.sass # for SASS
$ sass-rs --sass --expanded < source/style.sass
$ sass-rs --sass --compact < source/style.sass
$ sass-rs --sass --compressed < source/style.sass
$ sass-rs --sass --compressed < source/style.sass > build/style.css
This is a small added feature that isn't meant to fulfill every usecases. If you want to have something added to the binary, do a PR as I will not implement it myself.
Importers and functions are not supported yet.
Windows compilation using VS 2019 requires that all the environment variables for MSBuild to be availble.
An indicator that the environment is not properly setup is the following error message:
error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
If you find this error, you have a couple of of options to select:
Developer Command Prompt for VS 2019
application to compile the project. This terminal will setup all the needed environment variables to let it compile.PATH
, LIB
) as documented on Microsoft's website