added bootstrap webjar

This commit is contained in:
Athou
2014-03-03 11:33:44 +01:00
parent 840bc2ef7a
commit 464ac36ddb
8 changed files with 27 additions and 29 deletions

View File

@@ -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);
}
}

View File

@@ -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;
}

View File

@@ -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());
}
}