Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jadiagaurang committed Apr 2, 2022
2 parents e630425 + 8929ab1 commit 2f5397e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 10 deletions.
34 changes: 28 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,43 @@

[![NPM Downloads](https://img.shields.io/npm/dw/minify-all-cli)](https://www.npmjs.com/package/minify-all-cli)

Minify All JS, CSS and HTML files in a folder by using UglifyJS, CSSNano and HTMLMinifier.
Minify All JS, CSS and HTML files in a folder by using UglifyJS, CSSNano and HTMLMinifier with an option to gzip all the files as well. Package also supports processCount to set maximum degree of parallelism.

## Get Started
## Installation

```bash
npm install
npm install -g minify-all-cli
```

## Installation
## Command Line Usage

```bash
npm install -g minify-all-cli
minify-all-cli -s [source folder] -d [destination folder] [options]
```

### Command Line Options

```bash
Usage: -s <source> -d <destination>

Options:
--help Show help [boolean]
--version Show version number [boolean]
-j, --skipJS Should minify JS the file or skip it? [boolean]
-c, --skipCSS Should minify CSS the file or skip it? [boolean]
-h, --skipHTML Should minify HTML the file or skip it? [boolean]
-g, --doGzip Should gzip the file or skip it? [boolean]
-m, --skipFileMasks Partial Filder Path to skip it over [string]
-i, --ignoreFileMasks Partial Filder Path to ignore it over [string]
-f, --configFile Specifies a json configuration file for the
UglifyJS, CSSNano and HTML Minifier module [string]
-l, --logLevel Set log level to print warn, log, error,
fatal messages [string]
-p, --processCount Specifies process count to set maximum degree
of parallelism [number]
```

## Code Example
## CLI Example

### Prod

Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "minify-all-cli",
"version": "1.0.6",
"description": "Minify All JS, CSS and HTML files in a folder by using UglifyJS, CSSNano and HTMLMinifier",
"version": "1.0.7",
"description": "Minify All JS, CSS and HTML files in a folder by using UglifyJS, CSSNano and HTMLMinifier with an option to gzip all the files as well.",
"main": "bin/minify-all-cli.js",
"bin": {
"minify-all": "./bin/minify-all-cli.js"
Expand All @@ -11,7 +11,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/jadiagaurang/minify-all.git"
"url": "git+https://github.com/jadiagaurang/minify-all-cli.git"
},
"keywords": [
"Minify",
Expand All @@ -23,7 +23,8 @@
"Compress",
"uglifyjs",
"cssnano",
"html-minifier"
"html-minifier",
"gzip"
],
"author": "Gaurang Jadia",
"license": "MIT",
Expand Down

0 comments on commit 2f5397e

Please sign in to comment.