An SBT-plugin that enables compilation of SASS sources in your project.
This plugin is based on sbt-sass by @madoushi, which itself is based on sbt-sass by @ShaggyYeti, which is based on play-sass. All three previous plugin versions appear to be abandoned and do not support the current Dart Sass compiler, which is the "leading" one at the time of this writing.
Dart Sass needs to be installed for the plugin to work. On macOS Dart Sass is available via Homebrew and can be installed with:
% brew install sass/sass/sass
Include the plugin in project/plugins.sbt
as such:
addSbtPlugin("io.bullet" % "sbt-sassy" % "<VERSION>")
The plugin is based on sbt-web and should be compatible with SBT 0.13 and 1.x.
sbt-sassy follows the conventions of sbt-web regarding directory layout.
By default the plugin looks for *.sass
and *.scss
sources underneath the src/main/assets
folder,
so src/main/assets/sass
would be a good place to store your files.
Files starting with an underscore (_
) are not compiled into CSS files.
They can, however, be referenced from other SASS/SCSS files via an @import
directive.
sbt-sassy can be configured via a few SBT settings. See the sources for more info.
Patches and contributions are always welcome!