Skip to content

Commit

Permalink
Merge pull request #121 from quarkiverse/sass-bump
Browse files Browse the repository at this point in the history
Bump saas-compiler to 3.3.1
  • Loading branch information
ia3andy authored Nov 27, 2023
2 parents 5927b8b + 73c2b70 commit 931009c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion sass-compiler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<dependency>
<groupId>de.larsgrefer.sass</groupId>
<artifactId>sass-embedded-host</artifactId>
<version>2.5.2</version>
<version>3.3.1</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@
import java.util.function.BiConsumer;
import java.util.function.BiFunction;

import com.sass_lang.embedded_protocol.InboundMessage;
import com.sass_lang.embedded_protocol.InboundMessage.ImportResponse.ImportSuccess;
import com.sass_lang.embedded_protocol.OutputStyle;
import com.sass_lang.embedded_protocol.Syntax;

import de.larsgrefer.sass.embedded.CompileSuccess;
import de.larsgrefer.sass.embedded.SassCompilationFailedException;
import de.larsgrefer.sass.embedded.SassCompiler;
import de.larsgrefer.sass.embedded.SassCompilerFactory;
import de.larsgrefer.sass.embedded.importer.CustomImporter;
import sass.embedded_protocol.EmbeddedSass.InboundMessage.CompileRequest;
import sass.embedded_protocol.EmbeddedSass.InboundMessage.ImportResponse.ImportSuccess;
import sass.embedded_protocol.EmbeddedSass.OutboundMessage.CompileResponse.CompileSuccess;
import sass.embedded_protocol.EmbeddedSass.OutputStyle;
import sass.embedded_protocol.EmbeddedSass.Syntax;

public class SassBuildTimeCompiler implements BiFunction<String[], BiConsumer<String, String>, String> {

Expand Down Expand Up @@ -57,7 +58,7 @@ public String canonicalize(String url, boolean fromImport) throws Exception {
Path resolved = parent.resolve(url);
// prefix with _ for partials
if (!resolved.getFileName().toString().startsWith("_")) {
resolved = resolved.getParent().resolve("_" + resolved.getFileName().toString());
resolved = resolved.getParent().resolve("_" + resolved.getFileName());
}
return "sass:" + resolved;
}
Expand All @@ -76,7 +77,7 @@ public ImportSuccess handleImport(String url) throws Exception {
}
});
String contents = Files.readString(sassFile, StandardCharsets.UTF_8);
CompileRequest.StringInput stringInput = CompileRequest.StringInput.newBuilder()
InboundMessage.CompileRequest.StringInput stringInput = InboundMessage.CompileRequest.StringInput.newBuilder()
.setSource(contents)
.setUrl(sassFile.toString())
.setSyntax(isSass ? Syntax.INDENTED : Syntax.SCSS)
Expand Down

0 comments on commit 931009c

Please sign in to comment.