import fs from 'fs' ; import findUnusedCss from '../main/findUnusedCss' ; param cssPath param htmlContent param htmlPath returns async function unusedClassMapper ( cssPath , htmlContent , htmlPath ) { try { fs . readFileSync ( cssPath ) ; try { const classes = await findUnusedCss ( htmlContent , cssPath ) ; return [ classes , htmlPath ] ; } catch ( error ) { console . log ( error ) ; } } catch ( error ) { console . log ( 'Styling file for component ' + htmlPath + ' not found, skipping...' ) ; } } export default unusedClassMapper ;