Although I'm not an expert in node JS, I have come across cssnano as a JavaScript tool for minifying CSS, which apparently does a more sophisticated job compared to the outdated YUI compressor. My only issue is that I am struggling to understand how to use this tool on individual files like I can with the YUI compressor.
The command I'm familiar with looks like this
java -jar compilers\yuicompressor-2.4.7.jar --type=css --line-break=2048 infile.css -o "outfile.css"
This process is straightforward because I have a custom tool that runs through all my CSS files and applies this command to each one. However, I haven't been able to figure out how to swap out YUI with cssnano to achieve the same outcome.