Home > purgecss > PurgeCSS > getPurgedCSS

PurgeCSS.getPurgedCSS() method

Get the purged version of the css based on the files

Signature:

getPurgedCSS(cssOptions: Array<string | RawCSS>, selectors: ExtractorResultSets): Promise<ResultPurge[]>;

Parameters

ParameterTypeDescription
cssOptionsArray<string | RawCSS>css options, files or raw strings
selectorsExtractorResultSetsset of extracted css selectors

Returns:

Promise<ResultPurge[]>