    001package org.apache.tapestry5.webresources;
    002
    003import java.util.Optional;
    004
    005import org.apache.tapestry5.services.assets.StreamableResource;
    006
    007import com.google.javascript.jscomp.Compiler;
    008import com.google.javascript.jscomp.CompilerOptions;
    009
    010/**
    011 * Provide CompilerOptions for the GoogleClosureMinimizer.
    012 * TAP5-2661
    013 *
    014 * @since 5.7
    015 */
    016public interface GoogleClosureMinimizerOptionsProvider
    017{
    018    /**
    019     * Returns the compiler options to be used by GoogleClosureMinimizer.
    020     *
    021     * An empty Optional will result is the StreamableResource to be not minimized.
    022     * @return Optional of the supposed compiler options, or empty to disable minimizer
    023     */
    024    Optional<CompilerOptions> providerOptions(StreamableResource resource);
    025}