Package io.bit3.jsass
jsass is a feature complete java sass compiler,
using libsass.
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.
-
Class Summary Class Description Compiler The compiler compiles SCSS files, strings and contexts.Options The compiler options.Output The SASS compilation output.Sass2ScssOptions -
Enum Summary Enum Description OutputStyle Separator -
Exception Summary Exception Description CompilationException UnsupportedContextException