Menu icon Foundation
How do you use SASS... The guide is not a guide

Is there anyway to learn how to install and use Grunt and Libsass... I mean I installed node.js and ruby but the other stuff is not understandable. Is there a better resource for this?

Thanks.

SassnoderubyjavascriptFoundation

Is there anyway to learn how to install and use Grunt and Libsass... I mean I installed node.js and ruby but the other stuff is not understandable. Is there a better resource for this?

Thanks.

Alok Jethanandani over 5 years ago

Libsass is basically an alternative to using Compass. Libsass is a Ruby-less way to compile Sass. Libsass is a C/C++ port of the Sass preprocessing engine, meaning that Libsass uses C rather than Ruby to compile Sass into CSS.

http://libsass.org/

Bower is a package manager for web development packages. NPM is the node package manager, dedicated for all things backend.

http://bower.io/
https://www.npmjs.org/


To install the Grunt CLI (if you already have NPM installed)

 sudo npm install -g bower grunt-cli

Libsass is just a library. To run the code locally (i.e. to compile your stylesheets), you need an implementer. SassC (get it?) is an implementer written in C. To run the compiler on your local machine, you need to build SassC. To build SassC, you must have either local copy of the libsass source or it must be installed into your system. For development, please use the source version. You must then setup an environment variable pointing to the Libsass folder, for example:

export SASS_LIBSASS_PATH=/Users/hcatlin/path/libsass

You can add this line to your bash_profile by editing the following file:

sudo nano ~/.bash_profile or ~/.profile

Christian Matthias over 5 years ago

Very helpful info... I got everything going by not using the word sudo <<< I do not know why that worked but sudo was preventing anything from going forward. saying command not found. through git bash it installed bower and grunt and I made a project with libsass...

The next part after you say Libsass is just a library... I am a little lost... should I get SassC?

Alok Jethanandani over 5 years ago

Yeah you'll need SassC, an implementer, to compile your SCSS.

Follow the steps in the README.md to build SassC on your machine to compile SCSS.

https://github.com/hcatlin/sassc

Avery L over 5 years ago

I also found the grunt documentation very informative in understanding the compiling processor and helped me a lot: http://gruntjs.com/getting-started

Christian Matthias over 5 years ago

I have figured most of it out. The libsass generator from fz5 really is the key.