Package de.matrixweb.smaller.resource.ProcessorUtil

Examples of de.matrixweb.smaller.resource.ProcessorUtil.ProcessorCallback


  @Override
  public Resource execute(final VFS vfs, final Resource resource,
      final Map<String, Object> options) throws IOException {
    try {
      return ProcessorUtil.process(vfs, resource, "css",
          new ProcessorCallback() {
            @Override
            public void call(final Reader reader, final Writer writer)
                throws IOException {
              String root = resource.getPath();
              final int idx = root.lastIndexOf('/');
View Full Code Here


  @Override
  public Resource execute(final VFS vfs, final Resource resource,
      final Map<String, Object> options) throws IOException {
    try {
      return ProcessorUtil.process(vfs, resource, "css",
          new ProcessorCallback() {
            @Override
            public void call(final Reader reader, final Writer writer)
                throws IOException {
              final CssCompressor compressor = new CssCompressor(
                  new StringReader(resource.getContents()));
View Full Code Here

      this.executor.addScriptFile(getClass().getResource(
          "/uglify-" + this.version + "/uglify-js.js"));
      this.executor.addCallScript("uglify(%s, {});");
    }

    return ProcessorUtil.process(vfs, resource, "js", new ProcessorCallback() {
      @Override
      public void call(final Reader reader, final Writer writer)
          throws IOException {
        UglifyjsProcessor.this.executor.run(reader, writer);
      }
View Full Code Here

   *      de.matrixweb.smaller.resource.Resource, java.util.Map)
   */
  @Override
  public Resource execute(final VFS vfs, final Resource resource,
      final Map<String, Object> options) throws IOException {
    return ProcessorUtil.process(vfs, resource, "css", new ProcessorCallback() {
      @Override
      public void call(final Reader reader, final Writer writer)
          throws IOException {
        YcssminProcessor.this.executor.run(reader, writer);
      }
View Full Code Here

    if (runWithNode()) {
      return input.getResolver().resolve(
          '/' + this.node.run(vfs, input.getPath(), options));
    } else {
      return ProcessorUtil.process(vfs, input, "less", "css",
          new ProcessorCallback() {
            @Override
            public void call(final Reader reader, final Writer writer)
                throws IOException {
              LessjsProcessor.this.proxy.setResolver(input.getResolver());
              try {
View Full Code Here

   *      de.matrixweb.smaller.resource.Resource, java.util.Map)
   */
  @Override
  public Resource execute(final VFS vfs, final Resource resource,
      final Map<String, Object> options) throws IOException {
    return ProcessorUtil.process(vfs, resource, "js", new ProcessorCallback() {
      @Override
      public void call(final Reader reader, final Writer writer)
          throws IOException {
        compile(reader, writer, options);
      }
View Full Code Here

TOP

Related Classes of de.matrixweb.smaller.resource.ProcessorUtil.ProcessorCallback

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.