Salta

A Native, Blazingly Fast, and always up-to-date way of using Dart Sass in Deno.

The Salta Banner

Documentation

To get started, import Salta and its types from a registry like deno.land/x or use it directly from GitHub.

import { Salta, Style } from "https://deno.land/x/salta/src/mod.ts"

const EXAMPLE = Salta.compile({
    file: "/path/to/file.scss",
    style: Style.EXPANDED, // or STYLE.COMPRESSED
    quiet: true
})

console.log(EXAMPLE)

Salta under the hood relies on the sass (dart-sass) binary, which is not provided by most packages managers on Linux or Winget on Windows. You can, however, use ./src/install.ts to get a copy of said sass binary easily, or to update an existing one. It fetches from the official dart-sass repository and installs an "isolate" of it under the same folder as Deno.

As of v0.2.0, Salta can use the dart-sass compiled JS output to compile SCSS instead of the native "isolate", this also means Salta can now run on Deno Deploy. Please set the environment variable SALTA_USE_ISOLATE to a boolean to use the native "isolate" or the JS version. This was made possibly by @oscarotero's efforts on @lumeland/sass; we achieve this by vendoring that package and using it to compile SCSS.

License

Salta is licensed under the MIT License. See LICENSE for more information.