Examples of UglifyJsProcessor


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

          }
        }));
    map.put(UglifyJsProcessor.ALIAS_UGLIFY, new LazyProcessorDecorator(new LazyInitializer<ResourcePreProcessor>() {
      @Override
      protected ResourcePreProcessor initialize() {
        return new UglifyJsProcessor();
      }
    }));
    map.put(BeautifyJsProcessor.ALIAS_BEAUTIFY, new LazyProcessorDecorator(new LazyInitializer<ResourcePreProcessor>() {
      @Override
      protected ResourcePreProcessor initialize() {
View Full Code Here

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

  }

  @Test
  public void shouldUglifyFiles()
      throws IOException {
    final ResourcePostProcessor processor = new UglifyJsProcessor();
    final URL url = getClass().getResource("uglify");

    final File expectedFolder = new File(url.getFile(), "expected");
    WroTestUtils.compareFromDifferentFoldersByExtension(testFolder, expectedFolder, "js", processor);
  }
View Full Code Here

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

  }

  @Test
  public void shouldUseReservedNames()
      throws IOException {
    final ResourcePostProcessor processor = new UglifyJsProcessor() {
      @Override
      protected UglifyJs newEngine() {
        return super.newEngine().setReservedNames("name,value");
      }
    };
View Full Code Here

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

  }

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

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

    }.process("filename", "alert(1);");
  }

  @Test
  public void shouldSupportCorrectResourceTypes() {
    WroTestUtils.assertProcessorSupportResourceTypes(new UglifyJsProcessor(), ResourceType.JS);
  }
View Full Code Here

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

   * utility.
   *
   * @return A new {@link UglifyJsProcessor}.
   */
  public static UglifyJsProcessor uglifyJs() {
    return new UglifyJsProcessor();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.