import { IBuildTask } from "./i-build-task";
import { IBuildTaskExecuteOptions } from "./i-build-task-execute-options";
import { IProjectPathUtil } from "../../util/project-path-util/i-project-path-util";
import { ILoggerService } from "../../service/logger/i-logger-service";
import { IBundlerService } from "../../service/bundler/i-bundler-service";
import { IFileSaver } from "@wessberg/filesaver";
import { IManifestJsonWriterService } from "../../service/writer/manifest-json-writer/i-manifest-json-writer-service";
import { IIndexHtmlWriterService } from "../../service/writer/index-html-writer/i-index-html-writer-service";
import { IFileLoader } from "@wessberg/fileloader";
import { IAssetWriterService } from "../../service/writer/asset-writer/i-asset-writer-service";
import { IBuildConfig } from "../../build-config/i-build-config";
import { IBabelMinifyOptions } from "../../service/minify/i-babel-minify-options";
import { ICompressorService } from "../../service/compression/i-compressor-service";
import { IProjectParserService } from "../../service/parser/project-parser/i-project-parser-service";
import { IStylesParserService } from "../../service/parser/styles-parser/i-styles-parser-service";
import { IIndexHtmlParserService } from "../../service/parser/index-html-parser/i-index-html-parser-service";
import { IManifestJsonParserService } from "../../service/parser/manifest-json-parser/i-manifest-json-parser-service";
import { IAssetOptimizerService } from "../../service/asset-optimizer/i-asset-optimizer-service";
import { IPolyfillService } from "../../service/polyfill/i-polyfill-service";
import { IDevServerService } from "../../service/dev-server/i-dev-server-service";
import { IAssetParserService } from "../../service/parser/asset-parser/i-asset-parser-service";
import { IDiskCacheRegistryService } from "../../service/cache-registry/disk-cache-registry/i-disk-cache-registry-service";
import { ICompressionAlgorithmOptions } from "../../service/compression/compression-algorithm-options";
/**
 * A task used for building a Fovea project
 */
export declare class BuildTask implements IBuildTask {
    private readonly logger;
    private readonly config;
    private readonly projectParser;
    private readonly projectPathUtil;
    private readonly stylesParser;
    private readonly manifestJsonParser;
    private readonly indexHtmlParser;
    private readonly assetParser;
    private readonly assetOptimizer;
    private readonly bundler;
    private readonly fileSaver;
    private readonly fileLoader;
    private readonly manifestJsonWriter;
    private readonly indexHtmlWriter;
    private readonly assetWriter;
    private readonly minifyOptions;
    private readonly compressor;
    private readonly compressionAlgorithmOptions;
    private readonly polyfillService;
    private readonly devServer;
    private readonly cacheService;
    /**
     * An EventEmitter that can emit build-related events
     * @type {EventEmitter}
     */
    private readonly buildEventEmitter;
    /**
     * The time of the last time the build status changed
     * @type {number}
     */
    private timeOfLastBuildStatusChange;
    /**
     * The current build status
     * @type {BuildStatusKind}
     */
    private buildStatus;
    constructor(logger: ILoggerService, config: IBuildConfig, projectParser: IProjectParserService, projectPathUtil: IProjectPathUtil, stylesParser: IStylesParserService, manifestJsonParser: IManifestJsonParserService, indexHtmlParser: IIndexHtmlParserService, assetParser: IAssetParserService, assetOptimizer: IAssetOptimizerService, bundler: IBundlerService, fileSaver: IFileSaver, fileLoader: IFileLoader, manifestJsonWriter: IManifestJsonWriterService, indexHtmlWriter: IIndexHtmlWriterService, assetWriter: IAssetWriterService, minifyOptions: IBabelMinifyOptions, compressor: ICompressorService, compressionAlgorithmOptions: ICompressionAlgorithmOptions, polyfillService: IPolyfillService, devServer: IDevServerService, cacheService: IDiskCacheRegistryService);
    /**
     * Gets the time that has passed since the last time the build status changed
     * @type {number}
     */
    private readonly timeSinceLastBuildStatusChange;
    /**
     * Executes a 'build' task
     * @param {IBuildTaskExecuteOptions} buildTaskOptions
     * @returns {Promise<void>}
     */
    execute(buildTaskOptions: IBuildTaskExecuteOptions): Promise<void>;
    /**
     * Begins the built
     * @param {IBuildTaskExecuteOptions} options
     * @param {ISubscriber<void>} subscriber
     * @returns {IObserver}
     */
    private build;
    /**
     * Called each time the project changes
     * @param {IBuildProjectOptions} options
     * @param {ISubscriber<void>} subscriber
     * @returns {IObserver}
     */
    private buildProject;
    /**
     * Builds assets and proceeds with the rest of the build
     * @param {IBuildAssetsOptions} options
     * @param {ISubscriber<IAssetOptimizerServiceOptimizeDirectoryResult>} subscriber
     * @returns {IObserver}
     */
    private buildAssets;
    /**
     * Builds all outputs
     * @param {IBuildProjectOptions} options
     * @param {ISubscriber<void>} subscriber
     * @returns {IObserver}
     */
    private buildOutputs;
    /**
     * Builds an output from an IFoveaCliConfig
     * @param {IBuildOutputOptions} options
     * @param {ISubscriber<void>} subscriber
     * @returns {IObserver}
     */
    private buildOutput;
    /**
     * Builds anything but the styles for a bundle
     * @param {IBuildOutputFromStylesOptions} options
     * @param {ISubscriber<void>} subscriber
     * @returns {Promise<IObserver>}
     */
    private buildOutputFromStyles;
    /**
     * Adds environment variable values to the given scss content
     * @param {object} environmentVariables
     * @param {string} content
     */
    private addEnvironmentVariablesToScss;
    /**
     * Returns true if minification should be applied to generated bundles
     * @param {IFoveaCliOutputConfig} output
     * @param {IBuildTaskExecuteOptions} buildTaskOptions
     * @returns {boolean}
     */
    private shouldMinify;
    /**
     * Returns true if compression should be applied to generated bundles
     * @param {IFoveaCliOutputConfig} output
     * @param {IBuildTaskExecuteOptions} buildTaskOptions
     * @returns {boolean}
     */
    private shouldCompress;
    /**
     * Returns whatever option should be provided to Rollup in terms of whether or not to generate sourcemaps
     * @param {IFoveaCliOutputConfig} output
     * @param {IBuildTaskExecuteOptions} buildTaskOptions
     * @returns {IFoveaCliBundleOptimizationConfig["sourcemap"]}
     */
    private shouldGenerateSourcemaps;
    /**
     * Builds the bundle for an output
     * @param {IBuildOutputBundleOptions} options
     * @param {ISubscriber<void>} subscriber
     * @returns {IObserver}
     */
    private buildOutputBundle;
    /**
     * Builds all output files that isn't styles and isn't bundles, such as index.html and manifest.json
     * @param {IBuildOutputFilesOptions} options
     * @param {ISubscriber<void>} subscriber
     * @returns {void}
     */
    private buildOutputFiles;
    /**
     * Serves the build
     * @param {IServeOptions} options
     * @returns {Promise<void>}
     */
    private serve;
    /**
     * Builds theme variables and global styles
     * @param {IBuildStylesOptions} options
     * @param {ISubscriber<IStylesParserServiceResult>} subscriber
     * @returns {IObserver}
     */
    private buildStyles;
    /**
     * Gets the treeshaking options to pass on to Rollup
     * @param {IFoveaCliOutputConfig} output
     * @returns {IRollupServiceGenerateOptions["treeshake"]}
     */
    private getTreeshakingOptions;
    /**
     * Returns the minify options to use
     * @param {IFoveaCliOutputConfig} output
     * @returns {IBabelMinifyOptions}
     */
    private getMinifyOptions;
    /**
     * Returns the compress options to use
     * @param {IFoveaCliOutputConfig} output
     * @returns {ICompressionAlgorithmOptions}
     */
    private getCompressOptions;
    /**
     * Gets the options to use with Babel
     * @param {IFoveaCliOutputConfig} output
     * @param {IBuildTaskExecuteOptions} buildTaskOptions
     * @returns {IRollupPostPluginsOptions["babel"]}
     */
    private getBabelOptions;
    /**
     * Builds a ServiceWorker
     * @param {IBuildServiceWorkerOptions} options
     * @param {ISubscriber<IBundlerServiceBundlingEndedData>} subscriber
     * @returns {IBuildServiceWorkerResult}
     */
    private buildServiceWorker;
    /**
     * Clears the given directory unless it has been cleared previously
     * @param {string} directory
     * @param {Set<string>} clearedDirectories
     * @returns {void}
     */
    private clearDestinationDirectory;
    /**
     * Prints a status change to the console
     * @param {BuildStatusKind} status
     * @param {ISubscriberError<T>} [error]
     */
    private printStatusChange;
    /**
     * Updates the status of the build
     * @param {BuildStatusKind} status
     * @param {ISubscriberError<T>>} [error]
     */
    private updateStatus;
}
