lib/minify.js
async function onDataRead(filename, data) {
    log('file ' + path.basename(filename) + ' read');
    
    const ext = path.extname(filename).replace(/^\./, '');
    
    const optimizedData = await minify[ext](data);
    
    let b64Optimize;
    if (ext === 'css')
        [, b64Optimize] = await tryToCatch(minify.img, filename, optimizedData);
    
    return b64Optimize || optimizedData;
}
async function onDataRead(filename, data) {
    log('file ' + path.basename(filename) + ' read');
    
    const ext = path.extname(filename).replace(/^\./, '');
    
    const optimizedData = await minify[ext](data);
    
    let b64Optimize;
    if (ext === 'css')
        [, b64Optimize] = await tryToCatch(minify.img, filename, optimizedData);
    
    return b64Optimize || optimizedData;
}
Processing of files
@param fileData {name, data}