Package ro.isdc.wro.extensions.processor.support.less

Examples of ro.isdc.wro.extensions.processor.support.less.LessCss


   */
  @Override
  public void process(final Resource resource, final Reader reader, final Writer writer)
      throws IOException {
    final String content = IOUtils.toString(reader);
    final LessCss lessCss = enginePool.getObject();
    try {
      writer.write(lessCss.less(content));
    } catch (final WroRuntimeException e) {
      final String resourceUri = resource == null ? StringUtils.EMPTY : "[" + resource.getUri() + "]";
      LOG.warn("Exception while applying " + getClass().getSimpleName() + " processor on the " + resourceUri
          + " resource, no processing applied...", e);
      onException(e);
View Full Code Here


  /**
   * @return the {@link LessCss} engine implementation. Override it to provide a different version of the less.js
   *         library. Useful for upgrading the processor outside the wro4j release.
   */
  protected LessCss newLessCss() {
    return new LessCss();
  }
View Full Code Here

    WroTestUtils.compareFromDifferentFoldersByExtension(testFolder, expectedFolder, "css", processor);
  }

  @Test
  public void executeMultipleTimesDoesntThrowOutOfMemoryException() {
    final LessCss lessCss = new LessCss();
    for (int i = 0; i < 100; i++) {
      lessCss.less("#id {.class {color: red;}}");
    }
  }
View Full Code Here

    });
  }

  @Test
  public void shouldBePossibleToExtendLessCssWithDifferentScriptStream() {
    new LessCss() {
      @Override
      protected InputStream getScriptAsStream()
          throws IOException {
        return TestRhinoCoffeeScriptProcessor.class.getResourceAsStream("less.js");
      }
View Full Code Here

TOP

Related Classes of ro.isdc.wro.extensions.processor.support.less.LessCss

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.