Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Object.keys(cleaned).forEach(url => {
// console.log('For URL', url);
const obj = cleaned[url]
const cleanedAst = csstree.fromPlainObject(obj)
const cleanedCSS = csstree.translate(cleanedAst)
console.log(cleanedCSS)
})
const allCleanedCSS = cleanedCSS.map((ast) => {
const cleanedAst = fromPlainObject(ast);
return generate(cleanedAst)
}).join('\n');
const finalCss = collectImportantComments(allCleanedCSS);
const cleanedStyles = styleSheets.map(ast => {
const cleanedAST = fromPlainObject(cleaner(ast, checker))
return generate(cleanedAST)
})
const finalCSS = collectImportantComments(cleanedStyles.join('\n'))
const allCleanedCSS = cleanedCSS.map((ast) => {
const cleanedAst = fromPlainObject(ast)
return generate(cleanedAst)
}).join('\n')