Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function hemlstyles (contents, options = {}) {
const {
elements = {},
aliases = {},
plugins = []
} = options
return postcss([
...plugins,
// /** optimize css */
discardComments({ removeAll: false }),
minifyGradients(),
normalizeDisplayValues(),
normalizeTimingFunctions(),
convertValues({ length: false }),
reduceCalc(),
orderedValues(),
minifySelectors(),
minifyParams(),
discardOverridden(),
normalizeString(),
minifyFontValues({ removeQuotes: false }),
normalizeRepeatStyle(),
normalizePositions(),
discardEmpty(),
uniqueSelectors(),
declarationSorter(),
mergeAdjacentMedia(),
discardDuplicates(),
mergeRules(),