Skip to content

Warning

Jsass 6 is still in the early stages of development. API breaks are to be expected!

Architecture

Preview of the technical architecture.

classDiagram
  class JsassCompiler
  <<interface>> JsassCompiler
  JsassCompiler : +compileString(@NotNull String source, @Nullable Options options) CompletableFuture~Output~

  class Output
  Output : String css
  Output : String sourceMap

  class JavetV8JsassCompiler
  JsassCompiler <|-- JavetV8JsassCompiler

  class JavetNodeJsassCompiler
  JsassCompiler <|-- JavetNodeJsassCompiler

  class EmbeddedSassJsassCompiler
  JsassCompiler <|-- EmbeddedSassJsassCompiler

JsassCompiler Interface

The JsassCompiler interface is the new central entry point. Various implementations with different backends are available.

Backends

JavetV8JsassCompiler

Info

In early development!

The JavetV8JsassCompiler backend uses Javet in V8 Mode to run dart-sass. This mode can be flexibly expanded with additional ECMAScript modules.

JavetNodeJsassCompiler

Info

Conception phase!

The JavetNodeJsassCompiler backend uses Javet in Node mode to run dart-sass. This mode can be flexibly expanded with additional NPM modules.

EmbeddedSassJsassCompiler

Info

Conception phase!

The EmbeddedSassJsassCompiler backend uses the Embedded Sass Protocol to delegate the compile process. This mode effectively has the smallest resource footprint and requires an embedded Sass service.


More backends are being planned 🥳