@import "webjar:/bootstrap/3.2.0/less/bootstrap.less"
--
You received this message because you are subscribed to the Google Groups "wro4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wro4j+un...@googlegroups.com.
To post to this group, send email to wr...@googlegroups.com.
Visit this group at http://groups.google.com/group/wro4j.
For more options, visit https://groups.google.com/d/optout.
@import "classpath:META-INF/resources/webjars/bootstrap/3.2.0/less/bootstrap.less";
What this seems to result in is: the following URL according to the debug:
/less/classpath:META-INF/resources/webjars/bootstrap/3.2.0/less/bootstrap.less
private LessSource computeRelative(final Resource resource, final String relativePath) throws StringSourceException {
try {
final UriLocator locator = locatorFactory.getInstance(relativePath); final String relativeResourceUri; final String relativeResourceContent;
if (locator == null) { //This is not something we can do via locators alone, let's check for relative files relativeResourceUri = computeRelativeResourceUri(resource.getUri(), relativePath); relativeResourceContent = IOUtils.toString(locatorFactory.locate(relativeResourceUri), "UTF-8"); } else { relativeResourceUri = relativePath; relativeResourceContent = IOUtils.toString(locator.locate(relativePath), "UTF-8"); }
final Resource relativeResource = Resource.create(relativeResourceUri, ResourceType.CSS); return new RelativeAwareLessSource(relativeResource, relativeResourceContent, locatorFactory);
} catch (final IOException e) { LOG.error("Failed to compute relative resource: " + resource, e); throw new StringSourceException(); }}
Have you considered not using an import statement? We integrated bootstrap by ignoring the top level less file from the web jar and listing all of the component less files in our wro.xml instead. We have our own custom stuff interleaved between them all and it works just fine without imports.
Remember that all the less files in your your wro.xml are concatenated together before it goes through the less compiler.
Ta,
Greg
==========
"Sent from Ye Olde mobile device. Forgive my fat fingers and their typos."
p: +61 2 6262 1228, m: 0403 674 810, e: greg.pe...@gmail.com