Introduction
This chapter guides you through the installation of Sass and explains the different ways you can compile your Sass code into static CSS. You will not only learn how to use Sass using the command line interface (CLI), but you will also be introduced to LibSass. LibSass is a C/C++ port of the Sass engine.
Based on LibSass, sass.js
is a pure JavaScript implementation of the Sass engine, which enables you to compile Sass code with JavaScript and run sass.js
in your browser.
The sass-node
is an interpreter of LibSass for
Node.js, and it enables you to compile Sass in a Node.js environment. Together with a task runner, such as Gulp or Grunt, you can use the sass-node
to set up a build chain for your projects.
In this book, the SCSS syntax for Sass has been used in favor of the original indented Sass, that is, the Ruby-like syntax. You can write your SCSS code in your favorite text editor, but at the end of this chapter, you will also be introduced to some Graphical User Interfaces (GUI) that will help you write and compile your code more easily.