Skip to content

Commit

Permalink
Fixing the dartsass import shim
Browse files Browse the repository at this point in the history
  • Loading branch information
pfranza committed Sep 18, 2024
1 parent cf01fee commit 337e2e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ public ImportSuccess handleImport(String url) throws Exception {
url = url.replace("memory:", "");
}

if(url.startsWith("file:")) {
url = url.replace("file:", "");
}

// The method to actually resolve the import's content
Collection<ScssImport> scssImports = scssImporter.apply(url, null);
if (scssImports == null || scssImports.isEmpty()) {
Expand All @@ -136,7 +140,7 @@ public ImportSuccess handleImport(String url) throws Exception {
// Return the built ImportSuccess object
return result.build();
}
}.autoCanonicalize();
};
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,7 @@ private static void viz(String source) {
}

public static void main(String[] args) throws IOException {
//viz("#eee { background-color: #FFF;}");

// viz(".class-grades .form-list .label { width:120px; }");


String input = getFileContents(Paths.get("/Users/peter/git/harmonize/application/lms/src/main/java/net/ftlines/lms/pages/login/LoginPage.html"));

WicketPanelScssContributor scss = new WicketPanelScssContributor(input) {
Expand All @@ -210,9 +207,6 @@ protected void configureOptions(ScssOptions options) {
MarkupFragmentContributor.combine(new WicketExtendsMarkupContributor(input)), new CssScopeMetadata(new Properties()), true);

System.out.println(results.getScopedCss());

// viz(new WicketPanelCssContributor(AbstractSourceFileModifier.pathAsString(Paths.get(
// "/Users/peter/git/harmonize/application/lms/src/main/java/net/ftlines/lms/pages/login/LoginPage.html"))).getCss().get());
}

private static String getFileContents(Path p) {
Expand Down

0 comments on commit 337e2e5

Please sign in to comment.