Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
injection.unshift([{}, 's', '\n']);
injection.push([{}, 's', '\n']);
injection = [
[{}, 'atruler',
[{}, 'atkeyword',
[{}, 'ident', 'media' ]
],
[{}, 'atrulerq'].concat(media),
[{}, 'atrulers'].concat(injection)
]
];
}
// inject
injection.unshift(i, 1,
packCommentToken(csso.translate(csso.cleanInfo(token))),
[{}, 's', '\n\n']
);
topToken.splice.apply(topToken, injection);
i += injection.length - 2;
}
break;
case 'simpleselector':
var selectorTokens = token.slice(2);
for (var j = 0, part; part = selectorTokens[j]; j++)
{
if (part[1] == 'clazz')
{
var ident = part[2];
var identName = ident[2];
cssFiles.forEach(function(cssFile){
treeConsole.log(cssFile.basename);
//content = csso.justDoIt(content);
cssFile.content = csso.translate(csso.cleanInfo(csso.compress(cssFile.content)));
treeConsole.log(' * ' + cssFile.sourceSize + ' -> ' + cssFile.content.length);
});
cssFiles.forEach(function(cssFile){
cssFile.content = csso.translate(csso.cleanInfo(cssFile.content));
});
}
}
for (i = node.length - 1; i >= 0; i--) {
if (Array.isArray(node[i])) {
worklist.push(node[i]);
}
}
}
}
try {
ast = CSSO.compress(ast);
} catch (error) {
config.out.warn("CSS compression error: ");
config.out.warn(error.message);
}
try {
ast = CSSO.cleanInfo(ast);
} catch (error) {
config.out.warn("CSS clean info error:");
config.out.warn(error.message);
}
return CSSO.translate(ast);
}
for (var i = node.length - 1; i >= 0; i--) {
if (Array.isArray(node[i])) {
worklist.push(node[i]);
}
}
}
try {
ast = CSSO.compress(ast);
} catch (error) {
config.out.warn("CSS compression error: " + file.path);
config.out.warn(error.message);
}
try {
ast = CSSO.cleanInfo(ast);
} catch (error) {
config.out.warn("CSS clean info error: " + file.path);
config.out.warn(error.message);
}
return CSSO.translate(ast);
}