All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.alchim.mojo.yuicompressor.JSLintMojo Maven / Gradle / Ivy

Go to download

To compress (Minify + Ofuscate) Javascript files and CSS files (using YUI Compressor from Julien Lecomte) and/or to check Javascript files with jslint.

There is a newer version: 0.7.1
Show newest version
package net.sf.alchim.mojo.yuicompressor;

import java.io.File;

/**
 * Check JS files with jslint.
 *
 * @goal jslint
 *
 * @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, File destRoot) throws Exception {
        getLog().info("check file :" + src.toFile());
        jslint_.check(src.toFile(), jsErrorReporter_);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy