Is a API Wrapper for HTML, CSS, JS, IMAGE Minifyers
This Should maybe not get used and so we depricate it in favor of the nativ minifyers. we come to the conclusion that this api wrapper doubles logic
Offering a Super clean API for minifying Javascript, HTML or CSS. So you don't have to keep googling for the right tool or the tool’s API. And so that you get a nice CLI regardless.
This is Harp’s fork, which is nearly identical to the original. The differences are:
- It’s published to npm, to remove the dependency on GitHub for installing
- It has more up-to-date dependencies
- It has npm run scripts for development
npm install harp-minify
Usage: minify [<input>] [<output>]
Options:
-h, --help output usage information
-V, --version output the version number
Examples:
# pass an input and output file
$ minify input.css output.css
# use stdin and stdout
$ cat input.css | myth | minify > output.css
var minify = require('minify');
// choose javascript, html or css
var js = minify.js('js string');
var html = minify.html('html string');
var css = minify.css('css string');
// or pass an unknown string
var min = minify('unknown string');
When using JavaScript, you may also alter the default options using the same API as UglifyJS:
var js = minify.js('js string', {
compress: false,
mangle: false
});
The MIT License (MIT) => Apache-2.0 from 2016
Copyright © 2013–2015, Ian Storm Taylor <ian@ianstormtaylor.com>
Copyright © 2015 Chloi Inc.>
Copyright © 2016-2019 Frank Lemanschik