Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function doCleanFiles(fileIn, fileOut) {
if (fileIn.length > 0) {
var finalCode = [];
var origCode = "";
for (var i = 0, len = fileIn.length; i < len; ++i) {
console.log("[cleaning css] cleaning " + fileIn[i]);
origCode = fs.readFileSync(fileIn[i], 'utf8');
var minCss = cleanCSS.process(origCode, { debug: false });
finalCode.push(minCss);
};
base.createFloder(fileOut.substr(0, fileOut.lastIndexOf("/")), function() {
fs.writeFileSync(fileOut, finalCode.join(''), 'utf8');
});
}
}