Lesson Weekend

Now that we've learned more about Sass, let's get it up and running! This lesson will walk through installing Sass on our machines. Then we'll discuss how to configure Sass in a project in the next lesson.

Installation

Before we can begin using those fancy Sass features, we need to install it! As explained in the official Sass documentation, there are multiple methods to install Sass. We recommend the following for their ease:

Homebrew (OSX)

Anyone using the OSX Homebrew package manager can install Sass with the following command:

$ brew install sass/sass/sass

npm (Windows)

If you do not have Homebrew installed (if you're working on a Windows machine, for example) the second-easiest option is to install it via npm with the following command:

$ npm install -g sass

But do keep in mind that the official Sass documentation gives the following heads-up about installing with npm:

...note that this will install the pure JavaScript implementation of Sass, which runs somewhat slower than the other options listed here. But it has the same interface, so it'll be easy to swap in another implementation later if you need a bit more speed!

In most cases, the JavaScript implementation should work fine for our purposes. But if you later experience any issues, you can revisit Sass's installation instructions and select a different method at any time.

Confirmation

After following either method above, you should be able to run the command $ sass --help in the terminal, and receive a list of supported commands. This confirms your machine recognizes the $ sass command, and Sass has therefore been successfully installed! The response also contains a list of commonly-used Sass terminal commands for reference.

With Sass now installed, we can discuss how to configure a project for Sass styling in the next lesson!