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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Output
compile(Context context)
Compile context.Output
compile(FileContext context)
Compile file.Output
compile(StringContext context)
Compile a string context.Output
compileFile(java.net.URI inputPath, java.net.URI outputPath, Options options)
Compile file.Output
compileString(java.lang.String string, Options options)
Compile string.Output
compileString(java.lang.String string, java.net.URI inputPath, java.net.URI outputPath, Options options)
Compile string.static java.lang.String
getLibsassVersion()
static java.lang.String
sass2scss(java.lang.String source, int options)
-
-
-
Method Detail
-
compileString
public Output compileString(java.lang.String string, Options options) throws CompilationException
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 CompilationException
Compile 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 CompilationException
Compile 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
public Output compile(Context context) throws CompilationException
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
public Output compile(StringContext context) throws CompilationException
Compile a string context.- Parameters:
context
- The string context.- Returns:
- The compilation output.
- Throws:
CompilationException
- If the compilation failed.
-
compile
public Output compile(FileContext context) throws CompilationException
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)
-
getLibsassVersion
public static java.lang.String getLibsassVersion()
-
-