There are so many packages for building sass and scss files in Sublime Text 3, but I think a lot of them make it more complicated than it needs to be.

I prefer to use the official Sass compiler already on my system and just make a .sublime-build file for it.

Save this under your Sublime Text Packages/User folder as sass.sublime-build:

{
   "file_regex": "^([^:]*):([0-9]*):.*$",
   "selector": "source.scss, source.sass",
   "cmd": [
      "/usr/bin/sass",
      "--unix-newlines",
      "--trace",
      "--style=compressed",
      "--default-encoding=UTF-8",
      "$file",
      "$file_path/$file_base_name.css"
   ]
}

After saving, it should appear in your Build System menu as sass.

If you would like to know more about making your own .sublime-build files, the reference is located here: http://docs.sublimetext.info/en/latest/reference/build_systems/configuration.html


← Older   Newer →

Leave a Reply


<a href="" title="">, <abbr title="">, <acronym title="">, <b>, <blockquote cite="">, <cite>, <code>, <del datetime="">, <em>, <i>, <q cite="">, <s>, <strike>, <strong>