How to use node-minify - 3 common examples

To help you get started, we’ve selected a few node-minify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Pomax / pocketknife / minify.js View on Github external
files.forEach(function minify(file) {
  var filename = file.substring(file.lastIndexOf('/')+1);
  console.log("Minifying "+file);
  try { fs.mkdirSync("release"); } catch(e) {}
  new compressor.minify({
    type: 'gcc',
    fileIn: file + '.js',
    fileOut: "release/" + filename+ '-min.js'
  });
});
github joshuaswarren / magescotch / public / magento2 / dev / tools / grunt / tasks / mage-minify.js View on Github external
this.files.forEach(function (file, i) {
            var config = getConfig(options, file);

            /**
             * Callback function.
             */
            config.callback = function (err) {
                if (err) {
                    console.log(err);
                    done(false);
                } else if (i === total - 1) {
                    done();
                }
            };

            new compressor.minify(config);
        });
    });
github nodejam / nodejam / www-client / build-config.js View on Github external
return function(cb) {
                                options.callback = cb;
                                new compressor.minify(options);
                            };
                        }(options);

node-minify

Javascript / CSS minifier based on Babel-minify / Butternut / YUI Compressor / Google Closure Compiler / UglifyJS2 / Sqwish / Clean-css / CSSO

MIT
Latest version published 6 years ago

Package Health Score

57 / 100
Full package analysis

Popular node-minify functions