io.bit3.jsass.Options.setIsIndentedSyntaxSrc()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中io.bit3.jsass.Options.setIsIndentedSyntaxSrc()方法的一些代码示例,展示了Options.setIsIndentedSyntaxSrc()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options.setIsIndentedSyntaxSrc()方法的具体详情如下:
包路径:io.bit3.jsass.Options
类名称:Options
方法名:setIsIndentedSyntaxSrc

Options.setIsIndentedSyntaxSrc介绍

暂无

代码示例

代码示例来源:origin: jooby-project/jooby

options.setIsIndentedSyntaxSrc("sass".equals(syntax));
options.getImporters().add(new SassImporter(syntax, resolver));
options.setOutputStyle(style);

代码示例来源:origin: io.github.javaeden.orchid/OrchidCore

@Override
  public String compile(String extension, String input, Object... data) {
    if (extension.equals("scss")) {
      try {
        options.setIsIndentedSyntaxSrc(false);
        return new Compiler().compileString(input, options).getCss();
      }
      catch (CompilationException e) {
        e.printStackTrace();
        return "";
      }
    }
    else if (extension.equals("sass")) {
      try {
        options.setIsIndentedSyntaxSrc(true);
        return new Compiler().compileString(input, options).getCss();
      }
      catch (CompilationException e) {
        e.printStackTrace();
        return "";
      }
    }

    return input;
  }
}

代码示例来源:origin: com.github.warmuuh/libsass-maven-plugin

private Options getConfiguredOptions(String inputPathAbsolute, String sourceMapPathRelativeToInput) {
  Options opt = new Options();
  if(includePaths != null) {
    for (String path : includePaths.split(";")) {
      opt.getIncludePaths().add(new File(path));
    }
  }
  String allIncludePaths = new File(inputPathAbsolute).getParent();
  opt.getIncludePaths().add(new File(allIncludePaths));
  opt.setIsIndentedSyntaxSrc(inputSyntax == sass);
  opt.setOutputStyle(outputStyle);
  opt.setSourceComments(generateSourceComments);
  opt.setPrecision(precision);
  if (generateSourceMap) {
    opt.setSourceMapFile(new File(sourceMapPathRelativeToInput).toURI());
    opt.setSourceMapContents(embedSourceContentsInSourceMap);
    opt.setSourceMapEmbed(embedSourceMapInCSS);
    opt.setOmitSourceMapUrl(omitSourceMappingURL);
  } else {
    opt.setSourceMapContents(false);
    opt.setSourceMapEmbed(false);
    opt.setOmitSourceMapUrl(true);
  }
  if (enableClasspathAwareImporter) {
    opt.getImporters().add(new ClasspathAwareImporter());
  }
  return opt;
}

代码示例来源:origin: warmuuh/libsass-maven-plugin

private Options getConfiguredOptions(String inputPathAbsolute, String sourceMapPathRelativeToInput) {
  Options opt = new Options();
  if(includePaths != null) {
    for (String path : includePaths.split(";")) {
      opt.getIncludePaths().add(new File(path));
    }
  }
  String allIncludePaths = new File(inputPathAbsolute).getParent();
  opt.getIncludePaths().add(new File(allIncludePaths));
  opt.setIsIndentedSyntaxSrc(inputSyntax == sass);
  opt.setOutputStyle(outputStyle);
  opt.setSourceComments(generateSourceComments);
  opt.setPrecision(precision);
  if (generateSourceMap) {
    opt.setSourceMapFile(new File(sourceMapPathRelativeToInput).toURI());
    opt.setSourceMapContents(embedSourceContentsInSourceMap);
    opt.setSourceMapEmbed(embedSourceMapInCSS);
    opt.setOmitSourceMapUrl(omitSourceMappingURL);
  } else {
    opt.setSourceMapContents(false);
    opt.setSourceMapEmbed(false);
    opt.setOmitSourceMapUrl(true);
  }
  if (enableClasspathAwareImporter) {
    opt.getImporters().add(new ClasspathAwareImporter());
  }
  return opt;
}

代码示例来源:origin: io.freefair.gradle/jsass-gradle-plugin

File fakeMap = new File(fakeDestinationDir, pathString + ".map");
options.setIsIndentedSyntaxSrc(name.endsWith(".sass"));

代码示例来源:origin: io.freefair.gradle/jsass-plugin

File fakeMap = new File(fakeOut.getPath() + ".map");
options.setIsIndentedSyntaxSrc(name.endsWith(".sass"));

代码示例来源:origin: org.daisy.pipeline.modules.braille/css-utils

Compiler sassCompiler = new Compiler();
Options options = new Options();
options.setIsIndentedSyntaxSrc(false);
options.setOutputStyle(OutputStyle.EXPANDED);
options.setSourceMapContents(false);

相关文章