net_alchim31_maven_yuicompressor.JSLintMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yuicompressor-maven-plugin Show documentation
Show all versions of yuicompressor-maven-plugin Show documentation
To compress (Minify + Ofuscate) Javascript files and CSS
files (using YUI Compressor from Julien Lecomte) and/or to check
Javascript files with jslint.
package net_alchim31_maven_yuicompressor;
/**
* Check JS files with jslint.
*
* @goal jslint
* @phase process-resources
*
* @author David Bernard
* @created 2007-08-29
*/
// @SuppressWarnings("unchecked")
public class JSLintMojo extends MojoSupport {
private JSLintChecker jslint_;
@Override
protected String[] getDefaultIncludes() throws Exception {
return new String[] { "**/**.js" };
}
@Override
public void beforeProcess() throws Exception {
jslint_ = new JSLintChecker();
}
@Override
public void afterProcess() throws Exception {
}
@Override
protected void processFile(SourceFile src) throws Exception {
getLog().info("check file :" + src.toFile());
jslint_.check(src.toFile(), jsErrorReporter_);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy