import { IPostCSS } from "./i-postcss"; import { IPostCSSProcessOptions } from "./i-postcss-process-options"; import { IPostCSSProcessResult } from "./i-postcss-process-result"; import { IPostCSSConfiguration } from "./i-postcss-configuration"; /** * A class wrapper for PostCSS */ export declare class PostCSS implements IPostCSS { private readonly config; /** * The current PostCSS Processor instance * @type {Processor} */ private postCSSProcessor; constructor(config: IPostCSSConfiguration); /** * Retrieves a hook that can pass default configuration options to PostCSS plugins * @returns {PluginConfigurationHook} */ private readonly defaultPluginOptionsHook; /** * Retrieves a hook that can pass forced configuration options to PostCSS plugins * @returns {PluginConfigurationHook} */ private readonly forcedPluginOptionsHook; /** * Processes the provided template with the provided options * @param {IPostCSSProcessOptions} options * @returns {Promise} */ process(options: IPostCSSProcessOptions): Promise; /** * Prepares the PostCSSProcessor. It will reuse the existing one if the provided plugins hasn't changed * from a previous compilation * @param {IPostCSSProcessOptions} options */ private preparePostCSSProcessor; /** * Merges the plugins provided by the user with the default PostCSS plugins used by Fovea * @param {IPostCSSProcessOptions} options * @returns {postcss.AcceptedPlugin[]} */ private mergeUserProvidedPluginsWithDefaults; /** * Gets the name of a Postcss plugin * @param {postcss.AcceptedPlugin} plugin * @returns {string | undefined} */ private getPluginName; /** * Returns true if the given Postcss plugin is configurable * @param {AcceptedPlugin} plugin * @returns {boolean} */ private pluginIsConfigurable; /** * Prepares the given plugin, invoking the given hook if provided with one * @param {postcss.AcceptedPlugin} plugin * @param {PluginConfigurationHook} userHook * @returns {postcss.AcceptedPlugin} */ private preparePluginWithHook; }