2013-10-09 12:30:53 +02:00
|
|
|
---
|
2015-04-02 01:51:37 +02:00
|
|
|
title: Install Sass
|
2018-12-28 01:31:28 +01:00
|
|
|
no_container: true
|
2013-10-09 12:30:53 +02:00
|
|
|
---
|
2013-05-19 22:22:05 +02:00
|
|
|
|
2018-12-28 01:31:28 +01:00
|
|
|
.sl-l-grid.sl-l-grid--full.sl-l-large-grid--fit.sl-l-large-grid--gutters-large
|
|
|
|
.sl-l-grid__column
|
2018-10-24 00:06:39 +02:00
|
|
|
:markdown
|
|
|
|
## Applications
|
|
|
|
|
|
|
|
![Mouse](illustrations/mouse.svg)
|
|
|
|
|
2013-12-20 00:56:55 +01:00
|
|
|
There are a good many applications that will get you up and running
|
2015-04-02 01:51:37 +02:00
|
|
|
with Sass in a few minutes for Mac, Windows, and Linux. You can download
|
2013-10-12 23:39:55 +02:00
|
|
|
most of the applications for free but a few of them are paid apps
|
|
|
|
<small>(and totally worth it)</small>.
|
2013-10-09 12:30:53 +02:00
|
|
|
|
2018-12-29 02:59:53 +01:00
|
|
|
%ul
|
2013-10-11 22:06:20 +02:00
|
|
|
%li
|
2020-10-23 22:02:28 +02:00
|
|
|
= link_to "CodeKit", "https://codekitapp.com/"
|
2018-12-29 02:59:53 +01:00
|
|
|
(Paid)
|
|
|
|
Mac
|
2018-10-24 00:06:39 +02:00
|
|
|
|
2013-10-11 22:06:20 +02:00
|
|
|
%li
|
2018-10-24 00:06:39 +02:00
|
|
|
= link_to 'Prepros', 'https://prepros.io/'
|
2018-12-29 02:59:53 +01:00
|
|
|
(Paid)
|
|
|
|
Mac
|
|
|
|
Windows
|
|
|
|
Linux
|
2018-10-24 00:06:39 +02:00
|
|
|
|
2022-02-03 01:21:13 +01:00
|
|
|
:markdown
|
|
|
|
## 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:
|
|
|
|
|
|
|
|
%ul
|
2022-05-02 23:42:40 +02:00
|
|
|
%li
|
|
|
|
#{link_to 'Ruby', 'https://github.com/ntkme/sass-embedded-host-ruby#readme'}
|
|
|
|
|
|
|
|
%li
|
|
|
|
#{link_to 'Swift', 'https://github.com/johnfairh/swift-sass#readme'}
|
|
|
|
|
2023-04-06 00:11:51 +02:00
|
|
|
%li
|
|
|
|
#{link_to 'Java', 'https://mvnrepository.com/artifact/de.larsgrefer.sass'},
|
|
|
|
including:
|
|
|
|
|
|
|
|
%ul
|
|
|
|
%li
|
|
|
|
A
|
|
|
|
#{link_to 'Gradle plugin', 'https://docs.freefair.io/gradle-plugins/current/reference/#_embedded_sass'}.
|
|
|
|
|
|
|
|
%li
|
|
|
|
A lightweight
|
|
|
|
#{link_to '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 <code><args></code> list.
|
|
|
|
|
|
|
|
%li
|
|
|
|
A batteries-included
|
|
|
|
#{link_to 'Maven plugin wrapping Dart Sass', 'https://github.com/cleydyr/dart-sass-maven-plugin'}.
|
|
|
|
It bundles a fixed <code>dart-sass</code> version. The CLI arguments
|
|
|
|
are exposed as Maven parameters.
|
|
|
|
|
2018-12-28 01:31:28 +01:00
|
|
|
.sl-l-grid__column
|
2018-03-17 00:19:48 +01:00
|
|
|
:markdown
|
2018-10-24 00:06:39 +02:00
|
|
|
## Command Line
|
|
|
|
|
|
|
|
![Keyboard](illustrations/keyboard.svg)
|
|
|
|
|
2018-03-17 00:19:48 +01:00
|
|
|
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:
|
|
|
|
|
|
|
|
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
|
|
|
|
include `#{impl_version(:dart)}`. You can also run `sass --help` for more
|
|
|
|
information about the command-line interface.
|
|
|
|
|
|
|
|
Once it's all set up, <strong>go and play</strong>. If you're brand new to
|
|
|
|
Sass we've set up some resources to help you learn pretty darn quick.
|
|
|
|
|
2018-12-28 01:31:28 +01:00
|
|
|
%p= link_to 'Learn More About Sass', '/guide', :class => 'sl-c-button sl-c-button--primary'
|
2018-03-17 00:19:48 +01:00
|
|
|
|
|
|
|
%dl
|
|
|
|
%dt Install Anywhere (Standalone)
|
2018-10-24 00:06:39 +02:00
|
|
|
|
2018-03-17 00:19:48 +01:00
|
|
|
%dd
|
|
|
|
You can install Sass on Windows, Mac, or Linux by downloading the
|
|
|
|
package for your operating system
|
2018-10-24 00:06:39 +02:00
|
|
|
#{link_to 'from GitHub', release_url(:dart)} and
|
|
|
|
<a href='https://katiek2.github.io/path-doc/'>adding it to your
|
2018-03-21 22:11:45 +01:00
|
|
|
<code>PATH</code></a>. That's all—there are no external dependencies and
|
|
|
|
nothing else you need to install.
|
2018-03-17 00:19:48 +01:00
|
|
|
|
|
|
|
%dt Install Anywhere (npm)
|
2018-10-24 00:06:39 +02:00
|
|
|
|
2013-10-12 23:39:55 +02:00
|
|
|
%dd
|
2018-03-17 00:19:48 +01:00
|
|
|
%p
|
|
|
|
If you use Node.js, you can also install Sass using
|
2018-10-24 00:06:39 +02:00
|
|
|
<a href='https://www.npmjs.com/'>npm</a> by running
|
2018-03-17 00:19:48 +01:00
|
|
|
|
2014-12-04 20:00:17 +01:00
|
|
|
%pre
|
|
|
|
:preserve
|
2018-03-17 00:19:48 +01:00
|
|
|
npm install -g sass
|
|
|
|
|
2018-04-02 02:45:05 +02:00
|
|
|
<strong>However, please note</strong> that this will install the pure
|
2018-03-17 00:19:48 +01:00
|
|
|
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!
|
2013-05-19 22:22:05 +02:00
|
|
|
|
2021-03-18 21:07:03 +01:00
|
|
|
%dt Install on Windows (Chocolatey)
|
|
|
|
|
|
|
|
%dd
|
|
|
|
%p
|
|
|
|
If you use <a href='https://chocolatey.org/'>the Chocolatey package
|
|
|
|
manager</a> for Windows, you can install Dart Sass by running
|
|
|
|
|
|
|
|
%pre
|
|
|
|
:preserve
|
|
|
|
choco install sass
|
|
|
|
|
2020-08-17 19:38:30 +02:00
|
|
|
%dt Install on Mac OS X or Linux (Homebrew)
|
2018-10-24 00:06:39 +02:00
|
|
|
|
2013-10-12 23:39:55 +02:00
|
|
|
%dd
|
2018-03-17 00:19:48 +01:00
|
|
|
%p
|
2018-10-24 00:06:39 +02:00
|
|
|
If you use <a href='https://brew.sh/'>the Homebrew package
|
2020-08-17 19:38:30 +02:00
|
|
|
manager</a> for Mac OS X or Linux, you can install Dart Sass by
|
|
|
|
running
|
2018-03-17 00:19:48 +01:00
|
|
|
|
|
|
|
%pre
|
|
|
|
:preserve
|
2018-06-30 03:21:10 +02:00
|
|
|
brew install sass/sass/sass
|