Package de.matrixweb.smaller.common

Examples of de.matrixweb.smaller.common.SmallerException


        SourceFile.fromReader("source.js", reader), compilerOptions);
    if (result.success) {
      writer.write(compiler.toSource());
    } else {
      if (result.errors.length > 0) {
        throw new SmallerException("Closure Failed: "
            + result.errors[0].toString());
      }
    }
  }
View Full Code Here


        this.node = new NodeJsExecutor();
        this.node.setModule(getClass(), "coffeescript-" + this.version,
            "coffeescript.js");
      } catch (final IOException e) {
        this.node = null;
        throw new SmallerException("Failed to setup node for coffeescript", e);
      }
    }
    final String outfile = this.node.run(vfs,
        resource != null ? resource.getPath() : null, options);
    Resource result = resource;
View Full Code Here

      try {
        this.node = new NodeJsExecutor();
        this.node.setModule(getClass(), "eslint-" + this.version, "eslint.js");
      } catch (final IOException e) {
        this.node = null;
        throw new SmallerException("Failed to setup node for eslint", e);
      }
    }
    final String result = this.node.run(vfs, null, options);
    final String content = VFSUtils.readToString(vfs.find(result)).trim();
    if (content.length() > 0) {
      //throw new JsHintException(content);
      throw new SmallerException(content);
    }
    return resource;
  }
View Full Code Here

TOP

Related Classes of de.matrixweb.smaller.common.SmallerException

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.