Package de.larsgrefer.sass.embedded
Class SassCompiler
java.lang.Object
de.larsgrefer.sass.embedded.SassCompiler
- All Implemented Interfaces:
Closeable,AutoCloseable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccesssass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccesssass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccesscompileCssString(@NonNull String source) sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccesscompileFile(@NonNull File inputFile) sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccesscompileFile(@NonNull File file, @NonNull sass.embedded_protocol.EmbeddedSass.OutputStyle outputStyle) protected sass.embedded_protocol.EmbeddedSass.InboundMessage.CompileRequest.Buildersass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccesscompileSassString(@NonNull String source) sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccesscompileScssString(@NonNull String source) sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccesscompileString(@NonNull String source, sass.embedded_protocol.EmbeddedSass.Syntax syntax, sass.embedded_protocol.EmbeddedSass.OutputStyle outputStyle) sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccesscompileString(String source, sass.embedded_protocol.EmbeddedSass.Syntax syntax) sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccesscompileString(sass.embedded_protocol.EmbeddedSass.InboundMessage.CompileRequest.StringInput string, @NonNull sass.embedded_protocol.EmbeddedSass.OutputStyle outputStyle) sass.embedded_protocol.EmbeddedSass.OutputStyleHow to format the CSS output.sass.embedded_protocol.EmbeddedSass.OutboundMessage.VersionResponsebooleanWhether to encode the formatted message of errors and logs in ASCII.booleanWhether to use terminal colors in the formatted message of errors and logs.booleanWhether to emit a `@charset`/BOM for non-ASCII stylesheets.booleanWhether to generate a source map.booleanWhether to omit events for deprecation warnings coming from dependencies (files loaded from a different importer than the input).booleanWhether to include sources in the generated sourcemapbooleanWhether to report all deprecation warnings or only the first few ones.voidregisterFunction(@NonNull HostFunction sassFunction) voidregisterImporter(@NonNull CustomImporter customImporter) voidregisterImporter(@NonNull FileImporter fileImporter) voidsetAlertAscii(boolean alertAscii) Whether to encode the formatted message of errors and logs in ASCII.voidsetAlertColor(boolean alertColor) Whether to use terminal colors in the formatted message of errors and logs.voidsetEmitCharset(boolean emitCharset) Whether to emit a `@charset`/BOM for non-ASCII stylesheets.voidsetGenerateSourceMaps(boolean generateSourceMaps) Whether to generate a source map.voidsetLoadPaths(List<File> loadPaths) voidsetLoggingHandler(LoggingHandler loggingHandler) voidsetOutputStyle(sass.embedded_protocol.EmbeddedSass.OutputStyle outputStyle) How to format the CSS output.voidsetQuietDeps(boolean quietDeps) Whether to omit events for deprecation warnings coming from dependencies (files loaded from a different importer than the input).voidsetSourceMapIncludeSources(boolean sourceMapIncludeSources) Whether to include sources in the generated sourcemapvoidsetVerbose(boolean verbose) Whether to report all deprecation warnings or only the first few ones.
-
Constructor Details
-
SassCompiler
-
-
Method Details
-
getVersion
public sass.embedded_protocol.EmbeddedSass.OutboundMessage.VersionResponse getVersion() throws IOException- Throws:
IOException
-
registerFunction
-
registerImporter
-
registerImporter
-
compileRequestBuilder
protected sass.embedded_protocol.EmbeddedSass.InboundMessage.CompileRequest.Builder compileRequestBuilder() -
compile
public sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess compile(@NonNull @NonNull URL source) throws SassCompilationFailedException, IOException -
compile
public sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess compile(@NonNull @NonNull URL source, sass.embedded_protocol.EmbeddedSass.OutputStyle outputStyle) throws SassCompilationFailedException, IOException -
compileScssString
public sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess compileScssString(@NonNull @NonNull String source) throws IOException, SassCompilationFailedException -
compileSassString
public sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess compileSassString(@NonNull @NonNull String source) throws IOException, SassCompilationFailedException -
compileCssString
public sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess compileCssString(@NonNull @NonNull String source) throws IOException, SassCompilationFailedException -
compileString
public sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess compileString(String source, sass.embedded_protocol.EmbeddedSass.Syntax syntax) throws SassCompilationFailedException, IOException -
compileString
public sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess compileString(@NonNull @NonNull String source, sass.embedded_protocol.EmbeddedSass.Syntax syntax, sass.embedded_protocol.EmbeddedSass.OutputStyle outputStyle) throws IOException, SassCompilationFailedException -
compileString
@Nonnull public sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess compileString(sass.embedded_protocol.EmbeddedSass.InboundMessage.CompileRequest.StringInput string, @NonNull @NonNull sass.embedded_protocol.EmbeddedSass.OutputStyle outputStyle) throws IOException, SassCompilationFailedException -
compileFile
public sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess compileFile(@NonNull @NonNull File inputFile) throws IOException, SassCompilationFailedException -
compileFile
public sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess compileFile(@NonNull @NonNull File file, @NonNull @NonNull sass.embedded_protocol.EmbeddedSass.OutputStyle outputStyle) throws IOException, SassCompilationFailedException -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getOutputStyle
public sass.embedded_protocol.EmbeddedSass.OutputStyle getOutputStyle()How to format the CSS output.- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getStyle()
-
setOutputStyle
public void setOutputStyle(sass.embedded_protocol.EmbeddedSass.OutputStyle outputStyle) How to format the CSS output.- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getStyle()
-
isGenerateSourceMaps
public boolean isGenerateSourceMaps()Whether to generate a source map. Note that this will *not* add a source map comment to the stylesheet; that's up to the host or its users.- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getSourceMap()
-
setGenerateSourceMaps
public void setGenerateSourceMaps(boolean generateSourceMaps) Whether to generate a source map. Note that this will *not* add a source map comment to the stylesheet; that's up to the host or its users.- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getSourceMap()
-
isAlertColor
public boolean isAlertColor()Whether to use terminal colors in the formatted message of errors and logs.- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getAlertColor()
-
setAlertColor
public void setAlertColor(boolean alertColor) Whether to use terminal colors in the formatted message of errors and logs.- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getAlertColor()
-
isAlertAscii
public boolean isAlertAscii()Whether to encode the formatted message of errors and logs in ASCII.- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getAlertAscii()
-
setAlertAscii
public void setAlertAscii(boolean alertAscii) Whether to encode the formatted message of errors and logs in ASCII.- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getAlertAscii()
-
isVerbose
public boolean isVerbose()Whether to report all deprecation warnings or only the first few ones. If this is `false`, the compiler may choose not to send events for repeated deprecation warnings. If this is `true`, the compiler must emit an event for every deprecation warning it encounters.- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getVerbose()
-
setVerbose
public void setVerbose(boolean verbose) Whether to report all deprecation warnings or only the first few ones. If this is `false`, the compiler may choose not to send events for repeated deprecation warnings. If this is `true`, the compiler must emit an event for every deprecation warning it encounters.- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getVerbose()
-
isQuietDeps
public boolean isQuietDeps()Whether to omit events for deprecation warnings coming from dependencies (files loaded from a different importer than the input).- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getQuietDeps()
-
setQuietDeps
public void setQuietDeps(boolean quietDeps) Whether to omit events for deprecation warnings coming from dependencies (files loaded from a different importer than the input).- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getQuietDeps()
-
isSourceMapIncludeSources
public boolean isSourceMapIncludeSources()Whether to include sources in the generated sourcemap- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getSourceMapIncludeSources()
-
setSourceMapIncludeSources
public void setSourceMapIncludeSources(boolean sourceMapIncludeSources) Whether to include sources in the generated sourcemap- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getSourceMapIncludeSources()
-
isEmitCharset
public boolean isEmitCharset()Whether to emit a `@charset`/BOM for non-ASCII stylesheets.- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getCharset()
-
setEmitCharset
public void setEmitCharset(boolean emitCharset) Whether to emit a `@charset`/BOM for non-ASCII stylesheets.- See Also:
-
EmbeddedSass.InboundMessage.CompileRequest.getCharset()
-
setLoggingHandler
-
getLoggingHandler
-
getLoadPaths
-
setLoadPaths
-