2023-01-29 20:17:04 +01:00
|
|
|
---
|
|
|
|
layout: has_no_sidebars
|
|
|
|
title: Install Sass
|
|
|
|
no_container: true
|
|
|
|
---
|
|
|
|
|
|
|
|
<div class="sl-l-grid sl-l-grid--full sl-l-large-grid--fit sl-l-large-grid--gutters-large">
|
|
|
|
<div class="sl-l-grid__column">
|
|
|
|
|
|
|
|
## Applications
|
|
|
|
|
|
|
|
![Mouse](/assets/img/illustrations/mouse.svg)
|
|
|
|
|
|
|
|
There are a good many applications that will get you up and running
|
|
|
|
with Sass in a few minutes for Mac, Windows, and Linux. You can download
|
|
|
|
most of the applications for free but a few of them are paid apps
|
|
|
|
<small>(and totally worth it)</small>.
|
|
|
|
|
|
|
|
- [CodeKit](https://codekitapp.com/) (Paid) Mac
|
|
|
|
- [Prepros](https://prepros.io/) (Paid) Mac Windows Linux
|
|
|
|
|
|
|
|
## Libraries
|
|
|
|
|
|
|
|
The Sass team maintains two Node.js packages for Sass, both of which
|
|
|
|
support [the standard JavaScript API]. The [`sass` package] is pure
|
|
|
|
JavaScript, which is a little slower but can be installed on all platforms
|
|
|
|
Node.js supports. The [`sass-embedded` package] wraps a JS API around the
|
|
|
|
Dart VM, so it's faster but only supports Windows, Mac OS, and Linux.
|
|
|
|
|
|
|
|
[the standard JavaScript API]: /documentation/js-api
|
|
|
|
[`sass` package]: https://www.npmjs.com/package/sass
|
|
|
|
[`sass-embedded` package]: https://www.npmjs.com/package/sass-embedded
|
|
|
|
|
|
|
|
There are also community-maintained wrappers for the following languages:
|
|
|
|
|
|
|
|
- [Ruby](https://github.com/ntkme/sass-embedded-host-ruby#readme)
|
|
|
|
- [Swift](https://github.com/johnfairh/swift-sass#readme)
|
2023-04-07 21:16:09 +02:00
|
|
|
- [Java](https://mvnrepository.com/artifact/de.larsgrefer.sass), including:
|
|
|
|
- A [Gradle
|
|
|
|
plugin](https://docs.freefair.io/gradle-plugins/current/reference/#_embedded_sass).
|
|
|
|
- A lightweight [Maven plugin wrapping the Sass
|
|
|
|
CLI](https://github.com/HebiRobotics/sass-cli-maven-plugin). It specifies
|
|
|
|
the Sass version to use. The CLI arguments are passed-in with an `<args>`
|
|
|
|
list.
|
|
|
|
- A batteries-included [Maven plugin wrapping Dart
|
|
|
|
Sass](https://github.com/cleydyr/dart-sass-maven-plugin). It bundles a fixed
|
|
|
|
`dart-sass` version. The CLI arguments are exposed as Maven parameters.
|
2023-01-29 20:17:04 +01:00
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="sl-l-grid__column">
|
|
|
|
|
|
|
|
## Command Line
|
|
|
|
|
|
|
|
![Keyboard](/assets/img/illustrations/keyboard.svg)
|
|
|
|
|
|
|
|
When you install Sass on the command line, you'll be able to run the
|
|
|
|
`sass` executable to compile `.sass` and `.scss` files to `.css` files.
|
|
|
|
For example:
|
|
|
|
|
2023-05-26 14:23:18 +02:00
|
|
|
```shellsession
|
2023-01-29 20:17:04 +01:00
|
|
|
sass source/stylesheets/index.scss build/stylesheets/index.css
|
|
|
|
```
|
|
|
|
|
|
|
|
First install Sass using one of the options below, then run
|
|
|
|
`sass --version` to be sure it installed correctly. If it did, this will
|
2023-02-02 21:52:26 +01:00
|
|
|
include `{{ releases['dart-sass'].version }}`.
|
|
|
|
You can also run `sass --help` for more information
|
|
|
|
about the command-line interface.
|
2023-01-29 20:17:04 +01:00
|
|
|
|
|
|
|
Once it's all set up, **go and play**. If you're brand new to
|
|
|
|
Sass we've set up some resources to help you learn pretty darn quick.
|
|
|
|
|
2023-02-25 19:38:22 +01:00
|
|
|
[Learn More About Sass](/guide){.sl-c-button .sl-c-button--primary}
|
2023-01-29 20:17:04 +01:00
|
|
|
|
|
|
|
Install Anywhere (Standalone)
|
|
|
|
|
2023-01-30 18:34:42 +01:00
|
|
|
: You can install Sass on Windows, Mac, or Linux by downloading the package for
|
2023-01-29 20:17:04 +01:00
|
|
|
your operating system [from
|
2023-08-26 17:57:27 +02:00
|
|
|
GitHub](https://github.com/sass/dart-sass/releases/latest) and [adding it to
|
2023-01-29 20:17:04 +01:00
|
|
|
your `PATH`](https://katiek2.github.io/path-doc/). That's all—there are no
|
|
|
|
external dependencies and nothing else you need to install.
|
|
|
|
|
|
|
|
Install Anywhere (npm)
|
|
|
|
|
2023-01-30 18:34:42 +01:00
|
|
|
: If you use Node.js, you can also install Sass using
|
2023-01-29 20:17:04 +01:00
|
|
|
[npm](https://www.npmjs.com/) by running
|
|
|
|
|
2023-05-26 14:23:18 +02:00
|
|
|
```shellsession
|
2023-01-29 20:17:04 +01:00
|
|
|
npm install -g sass
|
|
|
|
```
|
|
|
|
|
|
|
|
**However, please 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!
|
|
|
|
|
|
|
|
Install on Windows (Chocolatey)
|
|
|
|
|
2023-01-30 18:34:42 +01:00
|
|
|
: If you use the [Chocolatey package manager](https://chocolatey.org/) for
|
2023-01-29 20:17:04 +01:00
|
|
|
Windows, you can install Dart Sass by running
|
|
|
|
|
2023-05-26 14:23:18 +02:00
|
|
|
```shellsession
|
2023-01-29 20:17:04 +01:00
|
|
|
choco install sass
|
|
|
|
```
|
|
|
|
|
|
|
|
Install on Mac OS X or Linux (Homebrew)
|
|
|
|
|
2023-01-30 18:34:42 +01:00
|
|
|
: If you use [the Homebrew package manager](https://brew.sh/) for Mac OS X or
|
2023-01-29 20:17:04 +01:00
|
|
|
Linux, you can install Dart Sass by running
|
|
|
|
|
2023-05-26 14:23:18 +02:00
|
|
|
```shellsession
|
2023-01-29 20:17:04 +01:00
|
|
|
brew install sass/sass/sass
|
|
|
|
```
|
|
|
|
|
2023-01-30 18:34:42 +01:00
|
|
|
</div>
|
2023-01-29 20:17:04 +01:00
|
|
|
</div>
|