A very light minifier Node.js module.
YUI Compressor
Yahoo Compressor
is a plugin for node-minify
It allow you to compress both JavaScript and CSS files.
Installation
npm install @node-minify/core @node-minify/yui
Usage
const minify = require('@node-minify/core');
const yui = require('@node-minify/yui');
minify({
compressor: yui,
type: 'js',
input: 'foo.js',
output: 'bar.js',
callback: function (err, min) {}
});
minify({
compressor: yui,
type: 'css',
input: 'foo.css',
output: 'bar.css',
callback: function (err, min) {}
});
Documentation
Visit https://node-minify.2clics.net/compressors/yui.html for full documentation