Compiling Sass Using the node-sass Node Package on a Mac
Posted on March 8, 2016 in Node.js, Sass by Matt Jennings


  1. First, install Node.js and NPM if you have not already done so.
  2. Open up Terminal, type in cd, and press Enter on your keyboard to ensure you are in the root.
  3. Install theĀ node-sass package in by typing the command below in Terminal:
    npm install -g node-sass
  4. In Terminal, navigate to the directory that holds .scss file you want convert to .css, and enter the command below which would would convert and compress a file named style.scss into style.css
    NOTE: The example below assumes that you have navigatated into a /wp-content/themes/mytheme/ directory. Then the ouputted and compressed style.css file is found at /wp-content/themes/mytheme/style.css:
    node-sass --output-style compressed style.scss style.css --watch

Leave a Reply

To Top ↑