Skip to content

Commit

Permalink
Update to dart-sass-embedded 1.54.9 and protocol 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgrefer committed Sep 7, 2022
1 parent 521e67a commit 803d392
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sass-embedded-host/build.gradle
Expand Up @@ -24,7 +24,7 @@ repositories {
}
}

def dartSassVersion = "1.54.8"
def dartSassVersion = "1.54.9"
def slf4jVersion = '2.0.0'
def springVersion = '5.3.22'
def webjarsVersion = '0.52'
Expand Down
Expand Up @@ -61,13 +61,23 @@ public class SassCompiler implements Closeable {
private boolean generateSourceMaps = false;

/**
* Whether to include sources in the generated sourcemap
* Whether to use terminal colors in the formatted message of errors and
* logs.
*
* @see CompileRequest#getSourceMapIncludeSources()
* @see CompileRequest#getAlertColor()
*/
@Getter
@Setter
private boolean sourceMapIncludeSources = false;
private boolean alertColor = false;

/**
* Whether to encode the formatted message of errors and logs in ASCII.
*
* @see CompileRequest#getAlertAscii()
*/
@Getter
@Setter
private boolean alertAscii = false;

/**
* Whether to report all deprecation warnings or only the first few ones.
Expand All @@ -81,6 +91,34 @@ public class SassCompiler implements Closeable {
@Setter
private boolean verbose = false;

/**
* Whether to omit events for deprecation warnings coming from dependencies
* (files loaded from a different importer than the input).
*
* @see CompileRequest#getQuietDeps()
*/
@Getter
@Setter
private boolean quietDeps = false;

/**
* Whether to include sources in the generated sourcemap
*
* @see CompileRequest#getSourceMapIncludeSources()
*/
@Getter
@Setter
private boolean sourceMapIncludeSources = false;

/**
* Whether to emit a `@charset`/BOM for non-ASCII stylesheets.
*
* @see CompileRequest#getCharset()
*/
@Getter
@Setter
private boolean emitCharset = false;

private final CompilerConnection connection;

private final Random compileRequestIds = new Random();
Expand Down Expand Up @@ -123,8 +161,6 @@ protected CompileRequest.Builder compileRequestBuilder() {
builder.setId(Math.abs(compileRequestIds.nextInt()));
builder.setStyle(outputStyle);
builder.setSourceMap(generateSourceMaps);
builder.setSourceMapIncludeSources(sourceMapIncludeSources);
builder.setVerbose(verbose);

for (File loadPath : loadPaths) {
CompileRequest.Importer importer = CompileRequest.Importer.newBuilder()
Expand All @@ -151,6 +187,13 @@ protected CompileRequest.Builder compileRequestBuilder() {
builder.addGlobalFunctions(sassFunction.getSignature());
}

builder.setAlertColor(alertColor);
builder.setAlertAscii(alertAscii);
builder.setVerbose(verbose);
builder.setQuietDeps(quietDeps);
builder.setSourceMapIncludeSources(sourceMapIncludeSources);
builder.setCharset(emitCharset);

return builder;
}

Expand Down
2 changes: 1 addition & 1 deletion sass-embedded-protocol/build.gradle
Expand Up @@ -20,7 +20,7 @@ repositories {
}

def protobufVersion = "3.21.5"
def protocolVersion = "1.0.0"
def protocolVersion = "1.1.0"

tasks.withType(com.google.protobuf.gradle.ProtobufExtract).configureEach {
doFirst {
Expand Down

0 comments on commit 803d392

Please sign in to comment.