Package ro.isdc.wro.extensions.processor.js

Examples of ro.isdc.wro.extensions.processor.js.HandlebarsJsProcessor


  private ResourcePreProcessor processor;

  @Before
  public void setUp() {
    Context.set(Context.standaloneContext());
    processor = new HandlebarsJsProcessor();
  }
View Full Code Here


  }

  @Test
  public void shouldBeThreadSafe()
      throws Exception {
    final HandlebarsJsProcessor processor = new HandlebarsJsProcessor();
    final Callable<Void> task = new Callable<Void>() {
      @Override
      public Void call() {
        try {
          processor.process(null, new StringReader("Hello {name}!"), new StringWriter());
        } catch (final Exception e) {
          throw new RuntimeException(e);
        }
        return null;
      }
View Full Code Here

      }
    }));
    map.put(HandlebarsJsProcessor.ALIAS, new LazyProcessorDecorator(new LazyInitializer<ResourcePreProcessor>() {
      @Override
      protected ResourcePreProcessor initialize() {
        return new HandlebarsJsProcessor();
      }
    }));
    map.put(RhinoTypeScriptProcessor.ALIAS, new LazyProcessorDecorator(new LazyInitializer<ResourcePreProcessor>() {
      @Override
      protected ResourcePreProcessor initialize() {
View Full Code Here

   * Compiles Handlebars templates to JavaScript code.
   *
   * @return A handlebars processor (only for no-dev environment).
   */
  public static ResourcePreProcessor handlebarsJs() {
    return new ConditionalProcessor(new HandlebarsJsProcessor(), NO_DEV);
  }
View Full Code Here

TOP

Related Classes of ro.isdc.wro.extensions.processor.js.HandlebarsJsProcessor

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.