Live Sass Compiler

This is a tutorial for using the “Live Sass Compiler” extension as an alternative to using node and “node-sass” as presented in Jonas’s tutorials.

Install the Extension “Live Sass Compiler”

Update your Settings JSON in VSCode

Using the command palette in VSCode

add the following key/value pairs to your JSON

 "liveSassCompile.settings.autoprefix": [],
  "liveSassCompile.settings.excludeList": [
    "/**/node_modules/**",
    "/.vscode/**"
  ],
  "liveSassCompile.settings.generateMap": false,
  "liveSassCompile.settings.formats": [
    {
      "format": "expanded",
      "extensionName": ".css",
      "savePath": "/css/"
    },
    {
      "format": "compressed",
      "extensionName": ".min.css",
      "savePath": "/css/"
    }
  ]

Use the sass filename “style.scss” instead of “main.scss”

Always open the folder in VSCode of the natours project

Run the compiler in the background using “watch sass”

When done you can stop watching sass

Published
Categorized as Posts

By Michael Branson Smith

Michael Smith is an Assistant Professor and Director of the Communications Technology program at York College. Prof. Smith hosts a personal digital archive project blog on Commons titled It Cannot Be Trivial.

Leave a comment

Your email address will not be published. Required fields are marked *