wro4j-extensions/src/main/java/ro/isdc/wro/extensions/processor/js/DojoShrinksafeCompressorProcessor.java
public void process(final Resource resource, final Reader reader, final Writer writer)
    throws IOException {
    final StopWatch watch = new StopWatch();
    watch.start("pack");
    //initialize rhino context
    Context.enter();
    try {
      final String script = IOUtils.toString(reader);
      final String stripConsole = null; //normal, warn, all
      LOG.debug("compressing script: {}", StringUtils.abbreviate(script, 40));
      final String out = Compressor.compressScript(script, 0, 0, stripConsole);

      writer.write(out);
    } finally {
      Context.exit();
      reader.close();
      writer.close();
      watch.stop();
      LOG.debug(watch.prettyPrint());
    }
  }
public void process(final Resource resource, final Reader reader, final Writer writer)
    throws IOException {
    final StopWatch watch = new StopWatch();
    watch.start("pack");
    //initialize rhino context
    Context.enter();
    try {
      final String script = IOUtils.toString(reader);
      final String stripConsole = null; //normal, warn, all
      LOG.debug("compressing script: {}", StringUtils.abbreviate(script, 40));
      final String out = Compressor.compressScript(script, 0, 0, stripConsole);

      writer.write(out);
    } finally {
      Context.exit();
      reader.close();
      writer.close();
      watch.stop();
      LOG.debug(watch.prettyPrint());
    }
  }
public void process ( final Resource resource , final Reader reader , final Writer writer ) throws IOException { final StopWatch watch = new StopWatch ( ) ; watch . start ( "pack" ) ; //initialize rhino context
 Context . enter ( ) ; try { final String script = IOUtils . toString ( reader ) ; final String stripConsole = null ; //normal, warn, all
 LOG . debug ( "compressing script: {}" , StringUtils . abbreviate ( script , 40 ) ) ; final String out = Compressor . compressScript ( script , 0 , 0 , stripConsole ) ; writer . write ( out ) ; } finally { Context . exit ( ) ; reader . close ( ) ; writer . close ( ) ; watch . stop ( ) ; LOG . debug ( watch . prettyPrint ( ) ) ; } }
{@inheritDoc}
{