mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
added bootstrap webjar
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.commafeed.frontend.resources;
|
||||
|
||||
import ro.isdc.wro.model.resource.processor.impl.css.CssUrlRewritingProcessor;
|
||||
|
||||
public class CustomCssUrlRewritingProcessor extends CssUrlRewritingProcessor {
|
||||
|
||||
/**
|
||||
* ignore webjar image replacements since they won't be available at runtime anyway
|
||||
*/
|
||||
@Override
|
||||
protected String replaceImageUrl(String cssUri, String imageUrl) {
|
||||
if (cssUri.startsWith("webjar:")) {
|
||||
return imageUrl;
|
||||
}
|
||||
return super.replaceImageUrl(cssUri, imageUrl);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,6 +20,7 @@ public class WroAdditionalProvider implements ProcessorProvider {
|
||||
map.put("sassOnlyProcessor", new SassOnlyProcessor());
|
||||
map.put("sassImport", new SassImportProcessor());
|
||||
map.put("timestamp", new TimestampProcessor());
|
||||
map.put("cssUrlRewriting", new CustomCssUrlRewritingProcessor());
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ public class WroManagerFactory extends ConfigurableWroManagerFactory {
|
||||
map.put("sassOnlyProcessor", new SassOnlyProcessor());
|
||||
map.put("sassImport", new SassImportProcessor());
|
||||
map.put("timestamp", new TimestampProcessor());
|
||||
map.put("cssUrlRewriting", new CustomCssUrlRewritingProcessor());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user