Package io.bit3.jsass
Class Compiler
java.lang.Object
io.bit3.jsass.Compiler
public class Compiler
extends java.lang.Object
The compiler compiles SCSS files, strings and contexts.
-
Constructor Summary
Constructors Constructor Description Compiler()Create new compiler. -
Method Summary
Modifier and Type Method Description Outputcompile(Context context)Compile context.Outputcompile(FileContext context)Compile file.Outputcompile(StringContext context)Compile a string context.OutputcompileFile(java.net.URI inputPath, java.net.URI outputPath, Options options)Compile file.OutputcompileString(java.lang.String string, Options options)Compile string.OutputcompileString(java.lang.String string, java.net.URI inputPath, java.net.URI outputPath, Options options)Compile string.static java.lang.Stringsass2scss(java.lang.String source, int options)
-
Constructor Details
-
Compiler
public Compiler()Create new compiler.
-
-
Method Details
-
compileString
Compile string.- Parameters:
string- The input string.options- The compile options.- Returns:
- The compilation output.
- Throws:
CompilationException- If the compilation failed.
-
compileString
public Output compileString(java.lang.String string, java.net.URI inputPath, java.net.URI outputPath, Options options) throws CompilationExceptionCompile string.- Parameters:
string- The input string.inputPath- The input path.outputPath- The output path.options- The compile options.- Returns:
- The compilation output.
- Throws:
CompilationException- If the compilation failed.
-
compileFile
public Output compileFile(java.net.URI inputPath, java.net.URI outputPath, Options options) throws CompilationExceptionCompile file.- Parameters:
inputPath- The input path.outputPath- The output path.options- The compile options.- Returns:
- The compilation output.
- Throws:
CompilationException- If the compilation failed.
-
compile
Compile context.- Parameters:
context- The context.- Returns:
- The compilation output.
- Throws:
UnsupportedContextException- If the given context is not supported.CompilationException- If the compilation failed.
-
compile
Compile a string context.- Parameters:
context- The string context.- Returns:
- The compilation output.
- Throws:
CompilationException- If the compilation failed.
-
compile
Compile file.- Parameters:
context- The file context.- Returns:
- The compilation output.
- Throws:
CompilationException- If the compilation failed.
-
sass2scss
public static java.lang.String sass2scss(java.lang.String source, int options)
-