See: Description
| Class | Description |
|---|---|
| Compiler |
The compiler compiles SCSS files, strings and contexts.
|
| Options |
The compiler options.
|
| Output |
The SASS compilation output.
|
| Enum | Description |
|---|---|
| OutputStyle | |
| Separator |
| Exception | Description |
|---|---|
| CompilationException | |
| UnsupportedContextException |
You should start with the Compiler class,
here is a short quick start example.
String input = "body { color: red; }";
URI inputFile = new File("stylesheet.scss").toURI();
URI outputFile = new File("stylesheet.css").toURI();
Compiler compiler = new Compiler();
Options options = new Options();
try {
Output output = compiler.compileString(input, inputFile, outputFile, options);
out.println("Compiled successfully");
out.println(output.getCss());
} catch (CompilationException e) {
err.println("Compile failed");
err.println(e.getErrorText());
}
You will find more examples in the documentation.