Compile SASS/SCSS From The Command Line

Method 1: Install Globally Using NPM

npm install -g sass

Method: 2: Install To Your Project Directory

npm install sass
alias “sass=node_modules/.bin/sass”

Method 3: Install Sass With Your Favorite Package Manager

Method 4: Install Standalone Executable

Running SASS

div {
p {
color: blue;
}
}
sass main.scss bundle.css
bundle.css
bundle.css.map
div p {
color: blue;
}
/*# sourceMappingURL=bundle.css.map */

Configuring The SASS Command

λ sass — version
1.32.8 compiled with dart2js 2.10.5
sass --watch main.scss bundle.css
SASS Command Watching For Changes
sass --watch scss/components:assets/css/components
sass --watch --no-source-map scss/components:assets/css/components

Wrap Up

Front-end Web Developer. Language lover. Traveler. Dude.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store