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 TypeMethodDescriptionvoid
close()
sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess
sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess
sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess
compileCssString
(@NonNull String source) sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess
compileFile
(@NonNull File inputFile) sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess
compileFile
(@NonNull File file, @NonNull sass.embedded_protocol.EmbeddedSass.OutputStyle outputStyle) protected sass.embedded_protocol.EmbeddedSass.InboundMessage.CompileRequest.Builder
sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess
compileSassString
(@NonNull String source) sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess
compileScssString
(@NonNull String source) sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess
compileString
(@NonNull String source, sass.embedded_protocol.EmbeddedSass.Syntax syntax, sass.embedded_protocol.EmbeddedSass.OutputStyle outputStyle) sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess
compileString
(String source, sass.embedded_protocol.EmbeddedSass.Syntax syntax) sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess
compileString
(sass.embedded_protocol.EmbeddedSass.InboundMessage.CompileRequest.StringInput string, @NonNull sass.embedded_protocol.EmbeddedSass.OutputStyle outputStyle) sass.embedded_protocol.EmbeddedSass.OutputStyle
How to format the CSS output.sass.embedded_protocol.EmbeddedSass.OutboundMessage.VersionResponse
boolean
Whether to encode the formatted message of errors and logs in ASCII.boolean
Whether to use terminal colors in the formatted message of errors and logs.boolean
Whether to emit a `@charset`/BOM for non-ASCII stylesheets.boolean
Whether to generate a source map.boolean
Whether to omit events for deprecation warnings coming from dependencies (files loaded from a different importer than the input).boolean
Whether to include sources in the generated sourcemapboolean
Whether to report all deprecation warnings or only the first few ones.void
registerFunction
(@NonNull HostFunction sassFunction) void
registerImporter
(@NonNull CustomImporter customImporter) void
registerImporter
(@NonNull FileImporter fileImporter) void
setAlertAscii
(boolean alertAscii) Whether to encode the formatted message of errors and logs in ASCII.void
setAlertColor
(boolean alertColor) Whether to use terminal colors in the formatted message of errors and logs.void
setEmitCharset
(boolean emitCharset) Whether to emit a `@charset`/BOM for non-ASCII stylesheets.void
setGenerateSourceMaps
(boolean generateSourceMaps) Whether to generate a source map.void
setLoadPaths
(List<File> loadPaths) void
setLoggingHandler
(LoggingHandler loggingHandler) void
setOutputStyle
(sass.embedded_protocol.EmbeddedSass.OutputStyle outputStyle) How to format the CSS output.void
setQuietDeps
(boolean quietDeps) Whether to omit events for deprecation warnings coming from dependencies (files loaded from a different importer than the input).void
setSourceMapIncludeSources
(boolean sourceMapIncludeSources) Whether to include sources in the generated sourcemapvoid
setVerbose
(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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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
-