I need help finding a way to pipe request output into clean-css for minification and then return it as a response. The application I am working on is using restify framework.
Here is an example of what I'm trying to accomplish:
var url = "http://www.example.com/css/style.css";
request.get(url).pipe(minify()).pipe(res);
I am struggling to define the minify() function to accept a stream and return one. Despite trying multiple packages, none have been successful so far. Any assistance would be greatly appreciated!