本文整理了Java中io.bit3.jsass.Options.setOutputStyle()
方法的一些代码示例,展示了Options.setOutputStyle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options.setOutputStyle()
方法的具体详情如下:
包路径:io.bit3.jsass.Options
类名称:Options
方法名:setOutputStyle
[英]Set the output style.
[中]设置输出样式。
代码示例来源:origin: jooby-project/jooby
options.setIsIndentedSyntaxSrc("sass".equals(syntax));
options.getImporters().add(new SassImporter(syntax, resolver));
options.setOutputStyle(style);
options.setIndent(get("indent"));
options.setLinefeed(get("linefeed"));
代码示例来源:origin: geogebra/geogebra
@Override
protected String process(String css, URL resource) throws Exception {
URI inputFile = null;
try {
inputFile = resource.toURI();
} catch (URISyntaxException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
URI outputFile = new File("stylesheet.css").toURI();
Options options = new Options();
options.setOutputStyle(OutputStyle.COMPRESSED);
Output output = new io.bit3.jsass.Compiler().compileString(css,
inputFile, outputFile, options);
return output.getCss();
}
代码示例来源: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: 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: org.daisy.pipeline.modules.braille/css-utils
Options options = new Options();
options.setIsIndentedSyntaxSrc(false);
options.setOutputStyle(OutputStyle.EXPANDED);
options.setSourceMapContents(false);
options.setSourceMapEmbed(false);
代码示例来源:origin: io.freefair.gradle/jsass-gradle-plugin
options.setLinefeed(getLinefeed());
options.setOmitSourceMapUrl(isOmitSourceMapUrl());
options.setOutputStyle(getOutputStyle());
options.setPluginPath(getPluginPath());
options.setPrecision(getPrecision());
代码示例来源:origin: io.freefair.gradle/jsass-plugin
options.setLinefeed(linefeed.get());
options.setOmitSourceMapUrl(omitSourceMapUrl.get());
options.setOutputStyle(outputStyle.get());
options.setPluginPath(pluginPath.getOrNull());
options.setPrecision(precision.get());
内容来源于网络,如有侵权,请联系作者删除!