Minify different types of files easily
- Zero-config
- Fast and easy to use
- Uses async/await
- Minifies files concurrently
- Supports multiple file types
npm install --global minifly
You can also use npx
:
npx minifly
Usage
$ minifly <options>
Options
--output, -o Output directory (Default: minifly)
--ignore, -i Ignore specific files or directories
--minExt, -m File extensions of minified files (Default: .min)
--concurrency, -c Max number of minifiers running at the same time (Default: CPU cores)
Examples
$ minifly
$ minifly -i 'index.js,dist/*.css' -o dist
$ minifly -m ''
Type | Minifier |
---|---|
HTML (*.html) | html-minifier |
CSS (*.css) | clean-css |
JavaScript (*.js) | terser |
JPG (*.jpg) | imagemin-mozjpeg |
PNG (*.png) | imagemin-pngquant |
GIF (*.gif) | imagemin-gifsicle |
SVG (*.svg) | imagemin-svgo |
More file types will be supported soon 🦄
MIT